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

fix: Remove reference to __latest__ migration of cms #124

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

vasekch
Copy link
Contributor

@vasekch vasekch commented Sep 11, 2023

Description

from Slack conversation:

Vašek Chalupníček:
Hi, anyone familiar with this problem?
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration djangocms_picture.0012_alter_picture_cmsplugin_ptr is applied before its dependency cms.0035_auto_20230822_2208 on database 'default'.
I hit this when I update djangocms v4 rc3 to rc4, it seems it originates from the fact that djangocms_picture.0012 has latest as it's dependency and after updating python code it resolves to cms.0035 which has not been applied yet.
I've resolved this by deleting djangocms_picture.0012 from django_migrations table (luckily this migration only contains label changes) - but it's stressful doing in production.
It seems to me that this may occur every time the cms update contains migrations.

Fabian Braun:
I think this is worth a PR to djangocms-picture. If it's only label changes it could refer to first instead of latest safely. Would you be interested in fixing this?
(It turns out having __latest__as a reference in migrations is a bad thing.)

@marksweb marksweb changed the title Update 0012_alter_picture_cmsplugin_ptr.py fix: Migration dependency on django-cms Sep 11, 2023
@fsbraun fsbraun changed the title fix: Migration dependency on django-cms fix: Remove reference to __latest__ migration of cms Sep 11, 2023
@fsbraun fsbraun merged commit 379df78 into django-cms:master Sep 11, 2023
9 checks passed
gruy pushed a commit to gruy/djangocms-picture that referenced this pull request Dec 2, 2023
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

Successfully merging this pull request may close these issues.

None yet

3 participants