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

Updating Wagtail from v3 to v4 deletes/recreates all modeltranslation fields from the database #413

Open
andre-fuchs opened this issue Dec 1, 2023 · 1 comment

Comments

@andre-fuchs
Copy link

andre-fuchs commented Dec 1, 2023

How do I upgrade a Wagtail 3.0 website with wagtail-modeltranslation 0.12 to newer versions?

I just tried to update to Wagtail 4.0 with wagtail-modeltranslation 0.13, but the Wagtail upgrade alone gets rid of all my beloved modeltranslation fields for the wagtailcore.page model. I tried both ways, upgrading Wagtail first and the wagtail-modeltranslation package later and vice versa. The migrate command even asks me again if I want to add these translation fields to the wagtailcore.page model:

Missing languages in "slug" field from "wagtailcore.page" model: en, de

SQL to synchronize "wagtailcore.page" schema:
   ALTER TABLE "wagtailcore_page" ADD COLUMN "slug_en" varchar(255);
   ALTER TABLE "wagtailcore_page" ADD COLUMN "slug_de" varchar(255);

Are you sure that you want to execute the previous SQL: (y/n) [n]:

This website is relatively huge and I do not think that a dumpdata + loaddata approach would be a successful workaround. Does anybody know how to update without loosing data?

@andre-fuchs andre-fuchs changed the title Updating Wagtail from v3 to v4 deletes all modeltranslation fields from the database Updating Wagtail from v3 to v4 deletes/recreates all modeltranslation fields from the database Dec 1, 2023
@DiogoMarques29
Copy link
Collaborator

Hey @andre-fuchs

We can't reproduce the issue. Are you sure no new languages were added?

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

2 participants