Skip to content

Commit

Permalink
Fixes soynatan#250
Browse files Browse the repository at this point in the history
  • Loading branch information
GigiusB committed Mar 27, 2023
1 parent 8eaeb75 commit e0dc709
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.1.7 on 2023-03-27 11:08

from django.db import migrations, models


class Migration(migrations.Migration):

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

operations = [
migrations.AddIndex(
model_name='crudevent',
index=models.Index(fields=['-datetime'], name='easyaudit_c_datetim_a13040_idx'),
),
]
4 changes: 3 additions & 1 deletion easyaudit/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ class Meta:
verbose_name_plural = _('CRUD events')
ordering = ['-datetime']
index_together = ['object_id', 'content_type', ]

indexes = [
models.Index(fields=['-datetime',]),
]

class LoginEvent(models.Model):
LOGIN = 0
Expand Down

0 comments on commit e0dc709

Please sign in to comment.