From 4edd5354604ed1175a5e3989978e8603814817d1 Mon Sep 17 00:00:00 2001 From: Skia Date: Tue, 20 Dec 2016 16:28:20 +0100 Subject: [PATCH] Change DateField to DateTimeField to improve indexing efficency --- core/migrations/0017_auto_20161220_1626.py | 19 +++++++++++++++++++ core/models.py | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 core/migrations/0017_auto_20161220_1626.py diff --git a/core/migrations/0017_auto_20161220_1626.py b/core/migrations/0017_auto_20161220_1626.py new file mode 100644 index 00000000..89e9bd3a --- /dev/null +++ b/core/migrations/0017_auto_20161220_1626.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0016_auto_20161212_1922'), + ] + + operations = [ + migrations.AlterField( + model_name='user', + name='last_update', + field=models.DateTimeField(verbose_name='last update', auto_now=True), + ), + ] diff --git a/core/models.py b/core/models.py index d27534df..5df983d2 100644 --- a/core/models.py +++ b/core/models.py @@ -106,7 +106,7 @@ class User(AbstractBaseUser): ), ) date_joined = models.DateField(_('date joined'), auto_now_add=True) - last_update = models.DateField(_('last update'), auto_now=True) + last_update = models.DateTimeField(_('last update'), auto_now=True) is_superuser = models.BooleanField( _('superuser'), default=False,