I'm following the guide provided in this answer, but I've run into an issue. I'm renaming myauth.MyUser
to myauth.User
.
I created my first set of migrations from other apps, converting every ForeignKey to an IntegerField. The migrations were created fine.
I then changed the name or my User model and created a migration, this was also fine.
I created my third set of migrations changing the fields back to ForeignKeys to the new model. These migrations also created fine.
I then manually added dependencies to the migration files, so that the FK -> Int migrations required the previous version of the user app, and the Int -> FK migrations required the latest, renaming migration.
All seems fine, however when I try to run manage.py migrate, I get the following error (a lot of times - for each FK):
The field otherapp.Model.user was declared with a lazy reference to 'myauth.user', but app 'myauth' doesn't provide model 'user'.
What is going on? Is there a way out of this situation?