[Update] ops adhoc date_created index (#2223)

pull/2230/head
jokimina 2018-12-20 10:34:42 +08:00 committed by 老广
parent db8882a2b9
commit 231c907c64
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 2.1 on 2018-12-19 10:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ops', '0004_adhoc_run_as'),
]
operations = [
migrations.AlterField(
model_name='task',
name='date_created',
field=models.DateTimeField(auto_now_add=True, db_index=True),
),
]

View File

@ -42,7 +42,7 @@ class Task(models.Model):
is_deleted = models.BooleanField(default=False)
comment = models.TextField(blank=True, verbose_name=_("Comment"))
created_by = models.CharField(max_length=128, blank=True, default='')
date_created = models.DateTimeField(auto_now_add=True)
date_created = models.DateTimeField(auto_now_add=True, db_index=True)
__latest_adhoc = None
_ignore_auto_created_by = True