Django migrations.exceptions.InvalidBasesError (in production)

I run a script with Docker in localhost, there is no problem but when I try to run it in a server, I always get the invalidbase migration error when I run the which starts with:

python makemigrations
python migrate
django.db.migrations.exceptions.InvalidBasesError: Cannot resolve bases for [<ModelState: 'project1.MetaFlatPage'>]
This can happen if you are inheriting models from an app with migrations (e.g. contrib.auth)
 in an app with no migrations; see for more

I run docker compose run web python makemigrations and output is: "PostgreSQL is up. No changes detected" then run docker compose run web python makemigrations got the same error above.

There are two different docker yml files; dev and production and they are slightly different. I don't know if this relevant but I can share those files too.

Back to Top