diff options
| author | Alex Gaynor <alex.gaynor@rd.io> | 2012-11-04 10:16:06 -0800 |
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@rd.io> | 2012-11-04 10:16:06 -0800 |
| commit | 4285571c5a9bf6ca3cb7c4d774942b9ae5b537e4 (patch) | |
| tree | 8969c90b79eeba64c1aacfd1e1f142364e18eacf /docs/ref | |
| parent | 249c3d730e632b3c5b8c2bf5e6e871d61df15c6c (diff) | |
Fixed #5805 -- it is now possible to specify multi-column indexes. Thanks to jgelens for the original patch.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/models/options.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt index c5ae8398ea..ab944d7dda 100644 --- a/docs/ref/models/options.txt +++ b/docs/ref/models/options.txt @@ -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`` ---------------- |
