diff options
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/checks.txt | 18 | ||||
| -rw-r--r-- | docs/ref/migration-operations.txt | 2 | ||||
| -rw-r--r-- | docs/ref/models/options.txt | 23 | ||||
| -rw-r--r-- | docs/ref/schema-editor.txt | 5 |
4 files changed, 13 insertions, 35 deletions
diff --git a/docs/ref/checks.txt b/docs/ref/checks.txt index 72699ac136..e641c989e3 100644 --- a/docs/ref/checks.txt +++ b/docs/ref/checks.txt @@ -345,21 +345,23 @@ Models ``<field name>`` from model ``<model>``. * **models.E007**: Field ``<field name>`` has column name ``<column name>`` that is used by another field. -* **models.E008**: ``index_together`` must be a list or tuple. +* **models.E008**: ``index_together`` must be a list or tuple. *This check + appeared before Django 5.1.* * **models.E009**: All ``index_together`` elements must be lists or tuples. + *This check appeared before Django 5.1.* * **models.E010**: ``unique_together`` must be a list or tuple. * **models.E011**: All ``unique_together`` elements must be lists or tuples. -* **models.E012**: ``constraints/indexes/index_together/unique_together`` - refers to the nonexistent field ``<field name>``. -* **models.E013**: ``constraints/indexes/index_together/unique_together`` - refers to a ``ManyToManyField`` ``<field name>``, but ``ManyToManyField``\s - are not supported for that option. +* **models.E012**: ``constraints/indexes/unique_together`` refers to the + nonexistent field ``<field name>``. +* **models.E013**: ``constraints/indexes/unique_together`` refers to a + ``ManyToManyField`` ``<field name>``, but ``ManyToManyField``\s are not + supported for that option. * **models.E014**: ``ordering`` must be a tuple or list (even if you want to order by only one field). * **models.E015**: ``ordering`` refers to the nonexistent field, related field, or lookup ``<field name>``. -* **models.E016**: ``constraints/indexes/index_together/unique_together`` - refers to field ``<field_name>`` which is not local to model ``<model>``. +* **models.E016**: ``constraints/indexes/unique_together`` refers to field + ``<field_name>`` which is not local to model ``<model>``. * **models.E017**: Proxy model ``<model>`` contains model fields. * **models.E018**: Autogenerated column name too long for field ``<field>``. Maximum length is ``<maximum length>`` for database ``<alias>``. diff --git a/docs/ref/migration-operations.txt b/docs/ref/migration-operations.txt index 7cc3a3926f..e8d8630851 100644 --- a/docs/ref/migration-operations.txt +++ b/docs/ref/migration-operations.txt @@ -247,7 +247,7 @@ Removes the index named ``name`` from the model with ``model_name``. Renames an index in the database table for the model with ``model_name``. Exactly one of ``old_name`` and ``old_fields`` can be provided. ``old_fields`` is an iterable of the strings, often corresponding to fields of -:attr:`~django.db.models.Options.index_together`. +``index_together`` (pre-Django 5.1 option). On databases that don't support an index renaming statement (SQLite and MariaDB < 10.5.2), the operation will drop and recreate the index, which can be diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt index 2a383b2b88..909577be6c 100644 --- a/docs/ref/models/options.txt +++ b/docs/ref/models/options.txt @@ -451,29 +451,6 @@ not be looking at your Django code. For example:: The ``ValidationError`` raised during model validation when the constraint is violated has the ``unique_together`` error code. -``index_together`` ------------------- - -.. attribute:: Options.index_together - - Sets of field names that, taken together, are indexed:: - - index_together = [ - ["pub_date", "deadline"], - ] - - This list of fields will be indexed together (i.e. the appropriate - ``CREATE INDEX`` statement will be issued.) - - For convenience, ``index_together`` can be a single list when dealing with a single - set of fields:: - - index_together = ["pub_date", "deadline"] - - .. deprecated:: 4.2 - - Use the :attr:`~Options.indexes` option instead. - ``constraints`` --------------- diff --git a/docs/ref/schema-editor.txt b/docs/ref/schema-editor.txt index 635272c982..b459e646bc 100644 --- a/docs/ref/schema-editor.txt +++ b/docs/ref/schema-editor.txt @@ -114,9 +114,8 @@ the new value. .. method:: BaseDatabaseSchemaEditor.alter_index_together(model, old_index_together, new_index_together) -Changes a model's :attr:`~django.db.models.Options.index_together` value; this -will add or remove indexes from the model's table until they match the new -value. +Changes a model's ``index_together`` value; this will add or remove indexes +from the model's table until they match the new value. ``alter_db_table()`` -------------------- |
