diff --git a/taggit/migrations/0006_taggit_index_together_deprecation.py b/taggit/migrations/0006_taggit_index_together_deprecation.py new file mode 100644 index 00000000..b7edae19 --- /dev/null +++ b/taggit/migrations/0006_taggit_index_together_deprecation.py @@ -0,0 +1,17 @@ +# Generated by Django 4.2.3 on 2023-07-06 09:04 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("taggit", "0005_auto_20220424_2025"), + ] + + operations = [ + migrations.RenameIndex( + model_name="taggeditem", + new_name="taggit_tagg_content_8fc721_idx", + old_fields=("content_type", "object_id"), + ), + ] diff --git a/taggit/models.py b/taggit/models.py index 05bca49f..9a37b156 100644 --- a/taggit/models.py +++ b/taggit/models.py @@ -187,5 +187,5 @@ class Meta: verbose_name = _("tagged item") verbose_name_plural = _("tagged items") app_label = "taggit" - index_together = [["content_type", "object_id"]] + indexes = [models.Index(fields=["content_type", "object_id"])] unique_together = [["content_type", "object_id", "tag"]]