﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
30955	Document the different behavior of migration historical models while they have abstract base classes.	Shipeng Feng	Shipeng Feng	"In the documentation of [https://docs.djangoproject.com/en/2.2/topics/migrations/#historical-models migrations], we have:

  In addition, the base classes of the model are just stored as pointers, so you must always keep base classes 
  around for as long as there is a migration that contains a reference to them. On the plus side, methods and 
  managers from these base classes inherit normally, so if you absolutely need access to these you can opt to move 
  them into a superclass.

However, this is not the case for abstract base classes, for example:


{{{
#!python
class ModelMixin(object):
    def method_in_mixin(self):
        pass


class BaseModel(ModelMixin, models.Model):
    class Meta:
        abstract = True

    create_time = models.DateTimeField(db_column='create_time', auto_now_add=True)

    def method_in_abstract(self):
        pass
}}}


In historical models, we can access {{{method_in_mixin}}}, but we can not access {{{method_in_abstract}}}.
I have a look at the source code and find out that abstract base classes won't appear in the bases of the
historical model.

If this is the desired behavior, I'd like it to be documented:

  In addition, the base classes (excluding abstract base classes) of the model are just stored as pointers, so
  you must always keep base classes...

If this is the right solution, I'd love to open a pull request to fix the docs.
"	Cleanup/optimization	closed	Documentation	2.2	Normal	fixed			Accepted	1	0	0	0	1	0
