Users will then be able to create indexes by defining something like the
following in their models:
{{{
#!python
class Meta:
indexes = [
models.Index(fields=['foo', 'bar'], name='my_index_name_idx')
]
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26808>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* needs_tests: => 0
* needs_docs: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/26808#comment:1>
Comment (by Markus Holtermann <info@…>):
In [changeset:"f7e00b40c558967d697529b7ed55c5fb82396e6d" f7e00b40]:
{{{
#!CommitTicketReference repository=""
revision="f7e00b40c558967d697529b7ed55c5fb82396e6d"
Refs #26808 -- Avoided clashing keyword arguments in test_autodetector
Factor method signatures in test_autodetector to avoid clashing keyword
arguments when introducing indexes.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26808#comment:2>
* status: new => assigned
* has_patch: 0 => 1
Comment:
PR: https://github.com/django/django/pull/6857
--
Ticket URL: <https://code.djangoproject.com/ticket/26808#comment:3>
* cc: emorley@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/26808#comment:4>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/26808#comment:5>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"6a8372e6ec42eb50e05f9dbcb26b783237bdc233" 6a8372e]:
{{{
#!CommitTicketReference repository=""
revision="6a8372e6ec42eb50e05f9dbcb26b783237bdc233"
Fixed #26808 -- Added Meta.indexes for class-based indexes.
* Added the index name to its deconstruction.
* Added indexes to sqlite3.schema._remake_table() so that indexes
aren't dropped when _remake_table() is called.
Thanks timgraham & MarkusH for review and advice.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26808#comment:6>