Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing squashed migrations prevents migration #822

Closed
jribbens opened this issue Feb 15, 2020 · 3 comments
Closed

Removing squashed migrations prevents migration #822

jribbens opened this issue Feb 15, 2020 · 3 comments

Comments

@jribbens
Copy link

Because the migrations have been squashed, migration is impossible as it returns the following error: django.db.utils.ProgrammingError: relation "reversion_revision" already exists... you have to pip install django-reversion==3.0.1 && ./manage.py migrate reversion && pip install -U django-reversion

If there were only 4 of them and somehow having both the originals and the squashed one causes problems, why not just remove the squashed one and keep the originals?

@etianen
Copy link
Owner

etianen commented Feb 17, 2020

Once a set of migrations have been squashed, they cannot be un-squashed without breaking existing projects. It's too late.

It should work to upgrade to 3.0.0, run migrate, then upgrade to 3.0.5, then migrate again.

@etianen etianen closed this as completed Feb 17, 2020
@m4rk3r
Copy link
Contributor

m4rk3r commented Apr 29, 2020

Perhaps this could be better called out in the changelog for those of us upgrading from old versions? @jribbens solution (uninstall, install 3.0.1, migrate, upgrade) worked

@etianen
Copy link
Owner

etianen commented Apr 29, 2020 via email

m4rk3r added a commit to m4rk3r/django-reversion that referenced this issue Apr 29, 2020
When upgrading from old versions it's necessary to incrementally upgrade at version `3.0.1`, run migrations, and then proceed.
[See here](etianen#822 (comment))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants