Skip to content

Commit

Permalink
fix: replace index_together with indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
mschoettle authored and jheld committed Mar 18, 2024
1 parent 01dcf49 commit daca3d8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.2.3 on 2023-07-26 18:41

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('easyaudit', '0017_alter_requestevent_datetime'),
]

operations = [
migrations.RenameIndex(
model_name='crudevent',
new_name='easyaudit_c_object__82020b_idx',
old_fields=('object_id', 'content_type'),
),
]
4 changes: 3 additions & 1 deletion easyaudit/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ class Meta:
verbose_name = _('CRUD event')
verbose_name_plural = _('CRUD events')
ordering = ['-datetime']
index_together = ['object_id', 'content_type', ]
indexes = [
models.Index(fields=['object_id', 'content_type']),
]


class LoginEvent(models.Model):
Expand Down

0 comments on commit daca3d8

Please sign in to comment.