0

I want to be able to not run a Django 1.8 migration.

I have seen people use the --fake option, but it's not a valid alternative for me, since it writes a new record on the django migrations database table. I dont like this, because I want to be able to run that migration on a later moment, and that wouldn't happen since django thinks it has been already done.

Is there any other way of avoiding to run a migration?

Xar
  • 7,572
  • 19
  • 56
  • 80
  • 1
    Probably not, since the later migrations depend on the ones before. – RemcoGerlich Sep 28 '16 at 14:36
  • how about *not* doing ./manage.py migrate ? – e4c5 Sep 28 '16 at 14:36
  • @e4c5 in that case I would not be running some migrations which the app really does need. – Xar Sep 28 '16 at 14:37
  • then as @RemcoGerlich points out, you can't do this because migrations are likely to depend on earlier ones. – e4c5 Sep 28 '16 at 14:38
  • 1
    You can [undo the faked migrations](http://stackoverflow.com/questions/31731211/undo-or-reset-the-faked-migrations-in-django/31731507#31731507) later, then run them for real. You can then fake any migrations that you have already run. Running migrations in the wrong order like this might cause problems. – Alasdair Sep 28 '16 at 14:41
  • 1
    You can delete the migration file and generate it again when required? You would need to amend the migration that has the deleted migration as a dependency – Iain Shelvington Sep 28 '16 at 15:45

0 Answers0