Re:Django 1.7 Released
by ProblemFactory on Wednesday September 03, 2014 @08:55AM
(#8262734)
Does migration squashing do what you are looking for: https://docs.djangoproject.com/en/dev/topics/migrations/#squ... ?
After squashing and migrating all existing databases, you can delete the old migrations files. The squashed migration becomes the new fresh migration that should usually contain just "CREATE TABLE" statements to be run on an empty database.
Using its best guess with dependency, it creates the appropriate migration file(s) favoring more files over potential conflicts. I think that's fine. The problem is consistency. However you choose to run the makemigrations, it should at least result in the same amount of files. It can't be more or less conflict if nothing is changed.
2. It may create more than 1 migration file if there are specific ordered dependencies afaik.