mirror of
https://github.com/django/django.git
synced 2025-08-15 16:20:37 +00:00
Refs #35234 -- Deprecated CheckConstraint.check in favor of .condition.
Once the deprecation period ends CheckConstraint.check() can become the documented method that performs system checks for BaseConstraint subclasses.
This commit is contained in:
parent
f82c67aa21
commit
daf7d482db
21 changed files with 210 additions and 136 deletions
|
@ -84,7 +84,7 @@ class CheckConstraintModel(models.Model):
|
|||
}
|
||||
constraints = [
|
||||
models.CheckConstraint(
|
||||
name="up_votes_gte_0_check", check=models.Q(up_votes__gte=0)
|
||||
name="up_votes_gte_0_check", condition=models.Q(up_votes__gte=0)
|
||||
),
|
||||
]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue