mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41: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
@@ -48,7 +48,7 @@ class ModelToValidate(models.Model):
|
||||
|
||||
class UniqueFieldsModel(models.Model):
|
||||
unique_charfield = models.CharField(max_length=100, unique=True)
|
||||
unique_integerfield = models.IntegerField(unique=True)
|
||||
unique_integerfield = models.IntegerField(unique=True, db_default=42)
|
||||
non_unique_field = models.IntegerField()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user