diff --git a/dalec/models.py b/dalec/models.py index 02db8dd..7599373 100644 --- a/dalec/models.py +++ b/dalec/models.py @@ -110,4 +110,4 @@ class Meta: ordering = ("-last_update_dt",) get_latest_by = "last_update_dt" abstract = True - index_together = (("app", "content_type", "channel", "channel_object"),) + indexes = [models.Index(fields=["app", "content_type", "channel", "channel_object"])] diff --git a/dalec_prime/migrations/0005_auto_20231017_1208.py b/dalec_prime/migrations/0005_auto_20231017_1208.py new file mode 100644 index 0000000..91b6294 --- /dev/null +++ b/dalec_prime/migrations/0005_auto_20231017_1208.py @@ -0,0 +1,23 @@ +# Generated by Django 3.2.21 on 2023-10-17 10:08 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("dalec_prime", "0004_alter_content_id_alter_fetchhistory_id"), + ] + + operations = [ + migrations.AlterIndexTogether( + name="content", + index_together=set(), + ), + migrations.AddIndex( + model_name="content", + index=models.Index( + fields=["app", "content_type", "channel", "channel_object"], + name="dalec_prime_app_636e7d_idx", + ), + ), + ]