[Answered ]-Manage.py migrate not working after a table has been dropped and re-created

2👍

Django adds a table to your database to manage what has been migrated. You can see the table django_migrations. You are in the situation that you deleted the table yourself, while the entry for it’s migration was left in django_migrations. To fix this the simplest way would be to fake a migration to zero:

python manage.py migrate --fake products zero

-1👍

I had this problem too. I notice that my ALL my files were not saved. After turning on VSCODE Auto Save, my migrations worked.

Leave a comment