I am trying to setup a Django app locally in a new machine but migrations seem to be totally broken. They need to be performed in a particular order, which worked in the first machine I set the environment in a couple months ago, but now there are inconsistencies (although I am pretty sure no new migrations were generated).
So the only solution I can think of is exporting the database from the old machine, where it is working, to the new one. Would that work?
This would not solve the broken migrations issue, but at least I can work on the code till there's a proper soltuion.
Answering this question:
Yes, this can work if you are sure that your database is in sync with your models. It is actually the way to go, if you want to be best prepared of updating your production environment.
./manage.py showmigrations(1.10),./manage.py migrate --list(1.7-1.9 and South)./manage.py migrate --fakeNote, in newer versions you can do
./manage.py migrateand it will report that everything is in order if the models and the migrations are in sync. This can be a sanity check before you deploy onto production.