mirror of
https://github.com/django/django.git
synced 2025-10-26 07:06:08 +00:00
[5.0.x] Fixed #35638 -- Updated validate_constraints to consider db_default.
Backport of 509763c799 from main.
This commit is contained in:
committed by
Sarah Boyce
parent
e88ef6a27d
commit
333cfab512
@@ -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")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user