infoportugal/wagtail-modeltranslation

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

Opened this issue · 1 comments

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?

Hey @andre-fuchs

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