Fixed #20888 -- Added support for column order in class-based indexes.

This commit is contained in:
Akshesh 2016-07-22 18:22:44 +05:30 committed by Tim Graham
parent 6b842c5998
commit 311a8e8d50
4 changed files with 60 additions and 6 deletions

View file

@ -34,6 +34,20 @@ options`_.
A list of the name of the fields on which the index is desired.
By default, indexes are created with an ascending order for each column. To
define an index with a descending order for a column, add a hyphen before the
field's name.
For example ``Index(fields=['headline', '-pub_date'])`` would create SQL with
``(headline, pub_date DESC)``. Index ordering isn't supported on MySQL. In that
case, a descending index is created as a normal index.
.. admonition:: Support for column ordering on SQLite
Column ordering is supported on SQLite 3.3.0+ and only for some database
file formats. Refer to the `SQLite docs
<https://www.sqlite.org/lang_createindex.html>`_ for specifics.
``name``
--------