Skip to content

Commit

Permalink
Created Migrations 02 test branch
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Jul 5, 2021
1 parent 7c99f0c commit b3f6c29
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
18 changes: 18 additions & 0 deletions migrations/0002_alter_testmodel_active.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.4 on 2021-07-03 05:41

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('demo', '0001_initial'),
]

operations = [
migrations.AlterField(
model_name='testmodel',
name='active',
field=models.BooleanField(default=True),
),
]
4 changes: 2 additions & 2 deletions models.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class TestModel(models.Model):
age = models.PositiveIntegerField(default=500)

if django.VERSION < (2, 1):
active = models.NullBooleanField()
active = models.NullBooleanField(default=True)
else:
active = models.BooleanField(null=True)
active = models.BooleanField(default=True)

class Meta:
verbose_name = _("test model")
Expand Down

0 comments on commit b3f6c29

Please sign in to comment.