I tried to squash migrations.
Unfortunately there are just too many circular dependencies.
Is there a way to start over the migrations (although my project is already deployed in production) than trying to squash the migrations?
I don't have to worry about some unknown developer using my project because it's a private project.
Yes, there is a way. See this similar question. In a nusthell:
# 1) Fake migrations back to 0
./manage.py migrate app zero --fake
# 2) Delete migrations files
git rm "app/migrations/*"
# 3) Create new migration file
./manage.py makemigrations app
# 4) Pretend to run the new migration
./manage.py migrate app --fake
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With