I'm curious as to how other Django devs manage their database migrations with South when developing with multiple code branches. Let me give a sample scenario.
Say for example you start you development with your main trunk. You create Branch A from the trunk. At this point, the last migration version for app_1
is 0010.
Then you create a migration for app_1
in the trunk that creates a migration file 0011_add_name_column
. Meanwhile, in branch A, another developer creates a different migration file for the same app_1
in branch A: 0011_increase_value_column_size
.
Branch A eventually gets merged back to trunk. When this happens, say last migration version in app_1
in Branch A is 0020
and in the trunk the last version is 0018
, and they're all different migrations. As you can see, the state of the migration files are messed up since version 0011
, when the branch was forked from trunk.. and they're all in conflicts upon merging.
According to South's tutorial, the only way to handle this case is to manually resolve all the conflicts. However, this is not really a desired solution if the amount of conflicts are significant. How do you typically handle this situation, or even to avoid it in the first place?