heartwood every commit a ring

Add url and user indexes

804a3298 by Isaac Bythewood · 3 years ago

added properties/migrations/0003_property_properties__url_7229e0_idx_and_more.py
@@ -0,0 +1,21 @@# Generated by Django 4.0.6 on 2022-07-17 03:05from django.db import migrations, modelsclass Migration(migrations.Migration):    dependencies = [        ('properties', '0002_property_last_lighthouse_run_at_and_more'),    ]    operations = [        migrations.AddIndex(            model_name='property',            index=models.Index(fields=['url'], name='properties__url_7229e0_idx'),        ),        migrations.AddIndex(            model_name='property',            index=models.Index(fields=['user'], name='properties__user_id_c32bda_idx'),        ),    ]
modified properties/models.py
@@ -167,6 +167,11 @@ class Property(AlertsMixin, SecurityMixin, models.Model):        verbose_name = "Property"        verbose_name_plural = "Properties"        indexes = [            models.Index(fields=["url"]),            models.Index(fields=["user"]),        ]    def __str__(self):        return self.url