I had to move a few models from one app to another, and I followed the instructions on this answer https://stackoverflow.com/a/26472482/188614.
Basically I used the CreateModel
migrations generated by python manage.py makemigrations
, wrapped them inside state_operations
, and added the 'db_table'
meta option with the old table's name.
Everything works fine, the models on the new_app
are corretly using the old tables.
But if I run python manage.py makemigrations new_app
it creates an AlterModelTable
migration for each table renaming them as None
, like this:
migrations.AlterModelTable(
name='cidade',
table=None,
),
Is this a bug, or expected behaviour?