As long as whatever tool we have fails hard rather than doing weird things
with related dependencies, I'm in favour of automating the process more -
we should reduce friction around migrations wherever possible.

As for undoing a conflicted migration, it should be relatively simple to
make the twin-tip check on the migrate command if you're asking to reverse
one of those tips; that should solve that issue.

Andrew

On Wed, Dec 2, 2015 at 2:48 PM, Shai Berger <s...@platonix.com> wrote:

> On Tuesday 01 December 2015 08:40:34 Andrew Godwin wrote:
> > You can undo a migration manually using migrate, though if you're in
> > multiple-tip-migration scenario you may need to make a merge migration
> > first (but not apply it) or switch to a branch with only the migration
> you
> > wish to undo.
> >
>
> Yep. But this is highly unintuitive: "To fix it, first make things worse".
>
> > The more general rebase command would be interesting, though I've always
> > been wary about adding one, as it's not a guarantee we can always keep -
> > some operations are irreversible, and in Django's case, a migration may
> not
> > be undoable without other related migrations for foreignkeys, so
> deleting a
> > migration would likely require deletion of those target migrations as
> well,
> > potentially?
> >
>
> Oh, I'd definitely not want that. If, in order to rebase a migration, I'd
> find
> that I need to roll other migrations back, I'd expect the rebase to fail.
>
> Similarly, if I get my "conflict-resistant undo", I'd expect it to require
> that
> the migration can be rolled back on its own. If others are dependent on it,
> they should be rolled back explicitly -- I'd really like to minimize
> automatic
> decision-making in a less-than-stable state.
>
> 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/CAFwN1urCWHouZ85ZvTNK3%3D-%3D1Bn4W83b3Pnr7bBZ8PYeVaL%2BJQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to