Fixed #30955 -- Doc'd that only concrete base models are stored in historical models bases.

Abstract models are removed from bases when generating historical model
state since 6436f1fad9.
This commit is contained in:
Shipeng Feng 2019-11-08 16:41:36 +08:00 committed by Mariusz Felisiak
parent 6d590bcf1f
commit 8058d9d7ad
1 changed files with 5 additions and 5 deletions

View File

@ -412,11 +412,11 @@ classes will need to be kept around for as long as there is a migration
referencing them. Any :doc:`custom model fields </howto/custom-model-fields>` referencing them. Any :doc:`custom model fields </howto/custom-model-fields>`
will also need to be kept, since these are imported directly by migrations. will also need to be kept, since these are imported directly by migrations.
In addition, the base classes of the model are stored as pointers, so you must In addition, the concrete base classes of the model are stored as pointers, so
always keep base classes around for as long as there is a migration that you must always keep base classes around for as long as there is a migration
contains a reference to them. On the plus side, methods and managers from these that contains a reference to them. On the plus side, methods and managers from
base classes inherit normally, so if you absolutely need access to these you these base classes inherit normally, so if you absolutely need access to these
can opt to move them into a superclass. you can opt to move them into a superclass.
To remove old references, you can :ref:`squash migrations <migration-squashing>` To remove old references, you can :ref:`squash migrations <migration-squashing>`
or, if there aren't many references, copy them into the migration files. or, if there aren't many references, copy them into the migration files.