#34336: Reverting a migration with `replaces = [...]` set does not revert it
---------------------------------+--------------------------------------
Reporter: Thomas Chaumeny | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 3.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Description changed by Thomas Chaumeny:
Old description:
> I have four migrations in an app. In migration 4, I have `replaces =
> [("my_app", "0002_foo")]`.
>
> When I migrate back from the state where all migration are applied to the
> first migration, it says that the migration 4 has been reverted.
>
> However, that migration is still marked as passed in the
> `django_migrations` table and when I try to migrate again to the state 4
> it fails saying that migration 4 was already applied.
>
> Is rollbacking a migration with `replaces` set supported? How is that
> supposed to behave, regarding the migration and the one it replaces?
New description:
I have four migrations in an app. In migration 4, I have `replaces =
[("my_app", "0002_foo")]`.
When I migrate back from the state where all migration are applied to the
first migration, it says that the migration 4 has been reverted.
However, that migration is still marked as passed in the
`django_migrations` table and when I try to migrate again to the state 4
it fails saying that migration 4 was already applied.
Is rollbacking a migration where `replaces` is set supported? How is that
supposed to behave, regarding the migration and the one it replaces?
--
--
Ticket URL: <https://code.djangoproject.com/ticket/34336#comment:1>
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/010701864b224402-808c2492-d6dc-404c-b7c2-fe4fbaf5b899-000000%40eu-central-1.amazonses.com.