Skip to content

Commit

Permalink
Remove index_together as it doesn't exist anymore in django5.1+
Browse files Browse the repository at this point in the history
  • Loading branch information
Augustin-FL committed Dec 27, 2024
1 parent 96efe74 commit 50d64a1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
8 changes: 0 additions & 8 deletions fir_notifications/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,4 @@ class Migration(migrations.Migration):
'verbose_name_plural': 'notification templates',
},
),
migrations.AlterUniqueTogether(
name='methodconfiguration',
unique_together=set([('user', 'key')]),
),
migrations.AlterIndexTogether(
name='methodconfiguration',
index_together=set([('user', 'key')]),
),
]
8 changes: 0 additions & 8 deletions fir_notifications/migrations/0002_user_preference.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,4 @@ class Migration(migrations.Migration):
'verbose_name_plural': 'notification preferences',
},
),
migrations.AlterUniqueTogether(
name='notificationpreference',
unique_together=set([('user', 'event', 'method')]),
),
migrations.AlterIndexTogether(
name='notificationpreference',
index_together=set([('user', 'event', 'method')]),
),
]
4 changes: 2 additions & 2 deletions fir_notifications/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class Meta:
verbose_name = _('method configuration')
verbose_name_plural = _('method configurations')
unique_together = (("user", "key"),)
index_together = ["user", "key"]
indexes = [models.Index(fields=["user", "key"])]


class NotificationTemplate(models.Model):
Expand Down Expand Up @@ -120,5 +120,5 @@ class Meta:
verbose_name = _('notification preference')
verbose_name_plural = _('notification preferences')
unique_together = (("user", "event", "method"),)
index_together = ["user", "event", "method"]
indexes = [models.Index(fields=["user", "event", "method"])]
ordering = ['user', 'event', 'method']

0 comments on commit 50d64a1

Please sign in to comment.