Added missing index on date field.

fix #2403
This commit is contained in:
Antoine Nguyen
2021-11-08 16:53:08 +01:00
parent ec14a1baff
commit fe30d962dd
2 changed files with 19 additions and 1 deletions
@@ -0,0 +1,18 @@
# Generated by Django 2.2.24 on 2021-11-08 15:52
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('maillog', '0002_auto_20200916_1346'),
]
operations = [
migrations.AlterField(
model_name='maillog',
name='date',
field=models.DateTimeField(db_index=True),
),
]
+1 -1
View File
@@ -7,7 +7,7 @@ class Maillog(models.Model):
"""A model to store message logs."""
queue_id = models.CharField(max_length=50)
date = models.DateTimeField()
date = models.DateTimeField(db_index=True)
sender = models.EmailField()
rcpt = models.EmailField()
original_rcpt = models.EmailField(null=True)