mirror of
https://github.com/django/django.git
synced 2025-02-28 19:44:35 +00:00
[4.2.x] Doc'd that Meta.indexes is preferred to Field.db_index.
Backport of f9fe062de5fc0896d6bbbf3f260b5c44473b3c77 from main
This commit is contained in:
parent
ce69dba000
commit
5a82acbda8
@ -351,6 +351,13 @@ looking at your Django code. For example::
|
||||
|
||||
If ``True``, a database index will be created for this field.
|
||||
|
||||
.. admonition:: Use the :attr:`~Options.indexes` option instead.
|
||||
|
||||
Where possible, use the :attr:`Meta.indexes <Options.indexes>` option
|
||||
instead. In nearly all cases, :attr:`~Options.indexes` provides more
|
||||
functionality than ``db_index``. ``db_index`` may be deprecated in the
|
||||
future.
|
||||
|
||||
``db_tablespace``
|
||||
-----------------
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user