As a project grows, migrations (both makemigrations
and migrate)
take longer and longer delaying quite a lot every deployment.
Django let's you to squash them so you don't have a long list of migration files but still, the migrations take the same amount of time.
Then I tried the following:
- Remove all the migration files in my app
- Clean the
django_migrations
table in the DB - Run
makemigrations
(to create the0001_initial
for my app) - Run
migrate --fake
(to populate todjango_migrations
table)
Now the new migrations are really fast at the expense of losing the migration history.
So my question is, considering that this could be like a v1.0, and it is a standalone project which any other project depends on, What are the risks of doing this?
I have the feeling that it is something that should not be done, since I could't find any specific Django command to do it. South
has a reset, but now django migrations only has the squash...