1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #35638 -- Updated validate_constraints to consider db_default.

This commit is contained in:
David Sanders
2024-08-05 08:22:29 +02:00
committed by Sarah Boyce
parent 91a038754b
commit 509763c799
10 changed files with 130 additions and 13 deletions

View File

@@ -128,3 +128,10 @@ class JSONFieldModel(models.Model):
class Meta:
required_db_features = {"supports_json_field"}
class ModelWithDatabaseDefault(models.Model):
field = models.CharField(max_length=255)
field_with_db_default = models.CharField(
max_length=255, db_default=models.Value("field_with_db_default")
)