summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2019-11-15 00:08:36 -0500
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-11-21 11:56:35 +0100
commite9a0e1d4f6ecfc4227acff74e1f56f288a0b30aa (patch)
treedeecc4f80b577d47f03e8ade90f410aa4cf32e07 /docs/ref
parent37e6c5b79bd0529a3c85b8c478e4002fd33a2a1d (diff)
Fixed #30484 -- Added conditional expressions support to CheckConstraint.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/constraints.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/ref/models/constraints.txt b/docs/ref/models/constraints.txt
index 0ac54cf265..9e3119f600 100644
--- a/docs/ref/models/constraints.txt
+++ b/docs/ref/models/constraints.txt
@@ -52,12 +52,16 @@ option.
.. attribute:: CheckConstraint.check
-A :class:`Q` object that specifies the check you want the constraint to
-enforce.
+A :class:`Q` object or boolean :class:`~django.db.models.Expression` that
+specifies the check you want the constraint to enforce.
For example, ``CheckConstraint(check=Q(age__gte=18), name='age_gte_18')``
ensures the age field is never less than 18.
+.. versionchanged:: 3.1
+
+ Support for boolean :class:`~django.db.models.Expression` was added.
+
``name``
--------