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

@ -49,5 +49,9 @@ class PrimaryKeyWithDefault(models.Model):
uuid = models.UUIDField(primary_key=True, default=uuid.uuid4)
class PrimaryKeyWithDbDefault(models.Model):
uuid = models.IntegerField(primary_key=True, db_default=1)
class ChildPrimaryKeyWithDefault(PrimaryKeyWithDefault):
pass