#32267: Unable to unapply a branch of migrations
-------------------------------+--------------------------------------
     Reporter:  Roman Odaisky  |                    Owner:  nobody
         Type:  New feature    |                   Status:  closed
    Component:  Migrations     |                  Version:  3.1
     Severity:  Normal         |               Resolution:  invalid
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------

Comment (by Roman Odaisky):

 Replying to [comment:4 Mariusz Felisiak]:
 > > Can we at the very least add something like `manage.py migrate
 --unapply-one <app> <migration>` that would unapply one migration, having
 ensured that no currently applied migrations depend on it? This will solve
 the use case I outlined and maybe some others while not being able to
 corrupt the DB state.
 >
 > Migrations can be reversed, see
 [https://docs.djangoproject.com/en/3.1/topics/migrations/#reversing-
 migrations docs]. However adding an option to reverse a specific migration
 doesn't sound like a good idea, we will not be able to ensure that a
 database state is not corrupted. Migrations history must be continuous.

 If we just do one check: that no children of this particular migration are
 applied. Does that not allow us to reverse the migration while
 guaranteeing consistency?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32267#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.530b39e33273181f8fb4d984a470f6a2%40djangoproject.com.

Reply via email to