mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Fixed #28330 -- Prevented passing positional arguments to an Index.
Thanks Tim Graham for the review.
This commit is contained in:
parent
d381914aef
commit
617505ca89
4 changed files with 18 additions and 7 deletions
|
@ -12,7 +12,7 @@ available from the ``django.contrib.postgres.indexes`` module.
|
|||
``BrinIndex``
|
||||
=============
|
||||
|
||||
.. class:: BrinIndex(fields=[], name=None, pages_per_range=None)
|
||||
.. class:: BrinIndex(pages_per_range=None, **options)
|
||||
|
||||
Creates a `BRIN index
|
||||
<https://www.postgresql.org/docs/current/static/brin-intro.html>`_.
|
||||
|
@ -22,7 +22,7 @@ available from the ``django.contrib.postgres.indexes`` module.
|
|||
``GinIndex``
|
||||
============
|
||||
|
||||
.. class:: GinIndex(fields=[], name=None, fastupdate=None, gin_pending_list_limit=None)
|
||||
.. class:: GinIndex(fastupdate=None, gin_pending_list_limit=None, **options)
|
||||
|
||||
Creates a `gin index
|
||||
<https://www.postgresql.org/docs/current/static/gin.html>`_.
|
||||
|
|
|
@ -404,6 +404,17 @@ For custom management commands that use options not created using
|
|||
class MyCommand(BaseCommand):
|
||||
stealth_options = ('option_name', ...)
|
||||
|
||||
Indexes no longer accept positional arguments
|
||||
---------------------------------------------
|
||||
|
||||
For example::
|
||||
|
||||
models.Index(['headline', '-pub_date'], 'index_name')
|
||||
|
||||
raises an exception and should be replaced with::
|
||||
|
||||
models.Index(fields=['headline', '-pub_date'], name='index_name')
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue