I have 82 migration files in my django app. Some of them are related to removed models. I want to merge all these 82 migration files into one migration file.
How do I do without deleting the database?
I have 82 migration files in my django app. Some of them are related to removed models. I want to merge all these 82 migration files into one migration file.
How do I do without deleting the database?
The django documentation has a section devoted to this.
From the documentation page:
./manage.py squashmigrations myapp 0004
Where myapp
is the name of your application, and 0004
is the migration to squash up to.