Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions migrations/testmodel_dob.py
Original file line number Diff line number Diff line change
@@ -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),
),
]
1 change: 1 addition & 0 deletions models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down