Answer the question
In order to leave comments, you need to log in
How to remove a migration?
I accidentally made a bad migration and now I don't know how to delete it. :( That is, as if the migration had not yet passed, I just did makemigrations. It created the migration, but when migrating was called, it threw an error (I accidentally set the date field to an empty string by default). I fixed it and did makemigrations and migrate again, but it now continues to complain about that error on the migrate command.How to rollback that migration?
Answer the question
In order to leave comments, you need to log in
manage.py showmigrations
check if your migration installed. If not installed, then simply delete the file of this migration and create it again
Roll back to a certain previous migration:
(after that files of later migrations can be deleted)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question