From 4285571c5a9bf6ca3cb7c4d774942b9ae5b537e4 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sun, 4 Nov 2012 10:16:06 -0800 Subject: Fixed #5805 -- it is now possible to specify multi-column indexes. Thanks to jgelens for the original patch. --- docs/ref/models/options.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'docs') 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 ` 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`` ---------------- -- cgit v1.3