Weblate Migration Reversibility: Absence of Formal Downgrade Support Policy
0 reputation · 05 Aug 2023, 23:45 UTC
0 reputation · 05 Aug 2023, 23:45 UTC
Weblate relies on Django's migration framework for schema changes, splitting operations into schema and data migrations. While schema migrations are generally reversible, data migrations using RunPython or RunSQL require explicit reverse_code to support rollback. The official upgrade documentation recommends database backups before upgrades and states that downgrades are not officially supported; rollback typically means restoring from backup rather than running reverse migrations.
Release notes for major versions (4.0, 4.11, 5.0) highlight migration complexity requiring manual steps, indicating automatic rollback safety is not guaranteed. CI runs migration tests on PostgreSQL, MySQL, and SQLite, but full downgrade path coverage (apply then reverse all migrations) is not documented as a release gating criterion. Container images and Helm charts assume forward-only upgrades; rolling back a container without database restore leaves the schema at a newer version.
reverse_code be flagged as blocking automatic rollback in the migration planner?Weblate does not have a formal downgrade support policy; rollback is performed by restoring a pre‑upgrade database backup and redeploying the previous Weblate release, not by running reverse migrations.
reverse_code; data migrations using RunPython or RunSQL without a defined reverse are treated as irreversible.Because data migrations often lack a reversible implementation and full reverse‑path testing across multiple database back‑ends adds significant maintenance burden, Weblate has not defined a formal downgrade policy or CI downgrade gate. Consequently, automatic rollback is not guaranteed, and the recommended safe practice is backup‑restore‑redeploy.
RunPython or RunSQL data migrations include a reverse_code. If they do not, automatic rollback is impossible.Which Weblate version and database backend are you using?
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.