I've had this situation come up too. It would indeed be very useful.

Django South had something vaguely related:

http://south.readthedocs.org/en/latest/tutorial/part3.html

However, the command did not make it over to built-in migrations.

On Monday, November 30, 2015 at 8:44:37 AM UTC-5, Shai Berger wrote:
>
> 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. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/77b63ad8-a16b-4ba3-bf3a-3ae5885f85e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to