Hello,
Part of my work lately was to help bring a large, complex project from Django
1.7 to 1.8. This effort was being done in parallel to continued development of
the project, in a separate branch. To make things more fun, the project uses
UUID fields for PKs in many models; on 1.7, this was done with
django-uuidfield,
but of course, with 1.8 we changed this to models.UUIDField. As a result, many
apps have migrations for moving to 1.8 (there are also a few more for
EmailField's etc).
I found myself, several times, getting new migrations in an app where I've
already added the 1.8-related migrations. When this happened, what I'd like to
do is "rebase" the migration -- undo it, delete it, and recreate it on top of
the newly-added migrations.
However, doing that turned out hard. Not only is there no single operation for
it, I couldn't even do the parts easily -- I could neither undo the migration
nor even fake it out, because the migration folder was in a "merge conflict"
state (more than one final migration).
A rebasemigration command would be wonderful. But the building block for it --
the ability to undo a single migration, even when a conflicting one has been
added to the tree, seems both more essential and easier to do.
Thoughts?
Thanks,
Shai.