Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.4.X] Fixed #18046 - Documented that an index is created by default…

… for ForeignKeys; thanks jbauer for the suggestion.

Backport of db598dd from master
  • Loading branch information...
commit fd90a906333b569340e5507fec3f3a4d4c1d0f47 1 parent 773a292
Tim Graham timgraham authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 docs/ref/models/fields.txt
6 docs/ref/models/fields.txt
View
@@ -972,6 +972,12 @@ need to use::
This sort of reference can be useful when resolving circular import
dependencies between two applications.
+A database index is automatically created on the ``ForeignKey``. You can
+disable this by setting :attr:`~Field.db_index` to ``False``. You may want to
+avoid the overhead of an index if you are creating a foreign key for
+consistency rather than joins, or if you will be creating an alternative index
+like a partial or multiple column index.
+
Database Representation
~~~~~~~~~~~~~~~~~~~~~~~
Please sign in to comment.
Something went wrong with that request. Please try again.