mirror of
https://github.com/django/django.git
synced 2025-08-03 02:23:12 +00:00
[1.5.x] Fixed #5805 -- it is now possible to specify multi-column indexes. Thanks to jgelens for the original patch. Backport of 4285571c5a
.
This commit is contained in:
parent
26e0651c42
commit
6f716e9e5f
12 changed files with 121 additions and 40 deletions
|
@ -261,6 +261,21 @@ Django quotes column and table names behind the scenes.
|
|||
:class:`~django.db.models.ManyToManyField`, try using a signal or
|
||||
an explicit :attr:`through <ManyToManyField.through>` model.
|
||||
|
||||
``index_together``
|
||||
|
||||
.. versionadded:: 1.5
|
||||
|
||||
.. 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.)
|
||||
|
||||
``verbose_name``
|
||||
----------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue