diff options
| author | Ian Foote <python@ian.feete.org> | 2020-11-22 22:27:57 +0000 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-05-12 19:11:40 +0200 |
| commit | 7414704e88d73dafbcfbb85f9bc54cb6111439d3 (patch) | |
| tree | f51136b16e457d7f46e01ff3cc06308faf0923db /tests/basic/models.py | |
| parent | 599f3e2cda50ab084915ffd08edb5ad6cad61415 (diff) | |
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.
Diffstat (limited to 'tests/basic/models.py')
| -rw-r--r-- | tests/basic/models.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/basic/models.py b/tests/basic/models.py index 59a6a8d67f..b71b60a213 100644 --- a/tests/basic/models.py +++ b/tests/basic/models.py @@ -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 |
