1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed #470 -- Added support for database defaults on fields.

Special thanks to Hannes Ljungberg for finding multiple implementation
gaps.

Thanks also to Simon Charette, Adam Johnson, and Mariusz Felisiak for
reviews.
This commit is contained in:
Ian Foote
2020-11-22 22:27:57 +00:00
committed by Mariusz Felisiak
parent 599f3e2cda
commit 7414704e88
32 changed files with 1089 additions and 34 deletions

View File

@@ -292,6 +292,13 @@ class OperationTestBase(MigrationTestBase):
("id", models.AutoField(primary_key=True)),
("pink", models.IntegerField(default=3)),
("weight", models.FloatField()),
("green", models.IntegerField(null=True)),
(
"yellow",
models.CharField(
blank=True, null=True, db_default="Yellow", max_length=20
),
),
],
options=model_options,
)