Define a new Model ConcreteThing
object pointing a the new base table. Only field is PK. Migrate it into place without changing anything else.
add a new field on the subclass which should ultimately inherit from ConcreteThing
. The field is a OneToOneField
to it, which is nullable.
data migration to create one ConcreteThing
for each existing intended subclass instance.
while there, having created the ConcreteThing
for the subclass to ultimately link to, set the OneToOneField
value to the right thing.
change the primary_key
for the subclass to be the OneToOne, and make it not nullable, and set parent_link
to True.
Drop the old pk field, if it still exists.
Moving other fields will involve the same kind of thing, a 3 step process of adding them to the parent, data migrating the data from the subclass to the parent, then deleting the fields from the subclass.