[SOLVED] Fix Django Migration Problems

Show migrations

python manage.py showmigrations

Delete migration files

find . -path "*/migrations/*.py" -not -name "__init__.py" -delete
find . -path "*/migrations/*.pyc"  -delete

Fake abnormal migrations (apps, example: core)

python manage.py migrate --fake core zero

Migrate

python manage.py makemigrations

python manage.py migrate --fake-initial

Don’t miss these tips!

We don’t spam! Read our privacy policy for more info.

Open chat
Powered by