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?
--
Ticket URL: <https://code.djangoproject.com/ticket/34336>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
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>
* status: new => closed
* resolution: => needsinfo
Comment:
> 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.
Reverting squashed migrations works for me. Did you manually add the
`replaces` attribute? Please reopen the ticket if you can debug your issue
and provide a small project that reproduces it.
--
Ticket URL: <https://code.djangoproject.com/ticket/34336#comment:2>