django_migration_testcase icon indicating copy to clipboard operation
django_migration_testcase copied to clipboard

Should throw an error if you ask for an invalid migration state.

Open plumdog opened this issue 9 years ago • 0 comments

If I ask for a migration state that is disallowed, should error, rather than carrying on and getting it wrong.

Eg, if app1 has two migrations, 0001, 0002 And app2 has a migration 0001, that depends on app1.0002

If I set before = [('app1', '0001'), ('app2', '0002')] then I am asking for something that cannot happen.

What will happen at present is that we just run the migrate commands sequentially. In affect:

django migrate app1 0001
django migrate app2 0002

Which will just end us up with app1 being at 0002, which is not what was asked for. This will require some digging around, because django doesn't (I believe) let you specify multiply targets when migrating.

plumdog avatar May 31 '16 15:05 plumdog