diff --git a/passbook/audit/migrations/0005_auditentry_created.py b/passbook/audit/migrations/0005_auditentry_created.py new file mode 100644 index 000000000..5ee9c9118 --- /dev/null +++ b/passbook/audit/migrations/0005_auditentry_created.py @@ -0,0 +1,20 @@ +# Generated by Django 2.1.4 on 2018-12-11 15:00 + +import django.utils.timezone +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('passbook_audit', '0004_auto_20181210_1348'), + ] + + operations = [ + migrations.AddField( + model_name='auditentry', + name='created', + field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now), + preserve_default=False, + ), + ] diff --git a/passbook/audit/models.py b/passbook/audit/models.py index da9b4ab07..3c957f515 100644 --- a/passbook/audit/models.py +++ b/passbook/audit/models.py @@ -46,6 +46,7 @@ class AuditEntry(UUIDModel): _context = models.TextField() _context_cache = None request_ip = models.GenericIPAddressField() + created = models.DateTimeField(auto_now_add=True) @property def context(self):