diff --git a/migrations/testmodel_dob.py b/migrations/testmodel_dob.py new file mode 100644 index 0000000..9343798 --- /dev/null +++ b/migrations/testmodel_dob.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.29 on 2021-07-09 13:04 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("demo", "0001_initial"), + ] + + operations = [ + migrations.AddField( + model_name="testmodel", + name="dob", + field=models.DateTimeField(blank=True, null=True), + ), + ] diff --git a/models.py b/models.py index 2973db3..d503902 100644 --- a/models.py +++ b/models.py @@ -7,6 +7,7 @@ class TestModel(models.Model): created_at = models.DateTimeField(auto_now_add=True) update_at = models.DateTimeField(auto_now=True) name = models.CharField(max_length=500) + dob = models.DateTimeField(blank=True, null=True) age = models.PositiveIntegerField(default=500) if django.VERSION < (2, 1):