#23410: Backward migrations change overall state rather than reverting single
migration
-----------------------------+--------------------
Reporter: Markush2010 | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------
When rolling back to a previous migration (or more precisely: state),
Django reverts all migrations between the current state and the one that
point in history looking at the linear migration plan. Taking the example
from the tests
(https://github.com/django/django/blob/1a918806ca67e8e4818aeb1c304e4546baab9e4d/tests/migrations/test_graph.py#L47-L50)
and the behavior how South handled backwards migrations, this is somehow
inconsistent and might even lead to data loss. I'd expect nothing to
happen in the example above.
Looking at the more complex example from the tests
(https://github.com/django/django/blob/1a918806ca67e8e4818aeb1c304e4546baab9e4d/tests/migrations/test_graph.py#L101-L104)
I wouldn't expect `c.0001` being rolled back, instead `a.0001`, `a.0002`,
`b.0001` and `c.0001` should still be applied.
--
Ticket URL: <https://code.djangoproject.com/ticket/23410>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/054.ddc85e265ee3a0aecd1a07d5169f03ad%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.