Say I have these migrations:
- 0001_initial
- 0002_add_some_column
- 0003_some_data_migration
All is fine at that point, but if I add one more schema migration:
- 0004_add_bar_column
and then try to run the migrations against a new DB, or any DB that doesn't have 0003 yet, 0003 will bork out because "column bar does not exist".
What is the correct way to handle that scenario? Do data migrations always have to be re-done, when a schema migration is added, such that the data migrations always come last? Is there a way to make the data migration not care that "bar" doesn't exist yet? The data migration doesn't make use of "bar", but for some reason Django still thinks it needs it to exist at that point...
I'm using the build-in Django migrations, not South.