summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPaveł Tyślacki <pavel.tyslacki@gmail.com>2018-12-27 22:43:30 +0300
committerTim Graham <timograham@gmail.com>2018-12-29 20:01:29 -0500
commitbdf3863bddd4e1bb91cfc3dec26e88420246426a (patch)
tree945fee7c96e0b6527aa6205fafb7ba7257bbdbd3 /docs
parentb71e3d635a5731ec02469822694d06d964007f9b (diff)
Fixed #30063 -- Doc'd that Meta.unique_together may be deprecated in favor of Meta.constraints.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/options.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt
index cbc199ba3d..e06a099a61 100644
--- a/docs/ref/models/options.txt
+++ b/docs/ref/models/options.txt
@@ -404,6 +404,12 @@ Django quotes column and table names behind the scenes.
.. attribute:: Options.unique_together
+ .. admonition:: Use :class:`.UniqueConstraint` with the :attr:`~Options.constraints` option instead.
+
+ :class:`.UniqueConstraint` provides more functionality than
+ ``unique_together``. ``unique_together`` may be deprecated in the
+ future.
+
Sets of field names that, taken together, must be unique::
unique_together = (("driver", "restaurant"),)