Yunohost v2.0.0: Is the rollback of module migrations supported?
27K reputation · 16 Sept 2024, 03:59 UTC
The goal is to revert database schema changes applied during a module upgrade on Yunohost v2.0.0. The core relies on Symfony/Doctrine migrations, yet no generic rollback command is exposed to undo all module‑specific changes in one step.
Current constraints include a manual backup dump that must be restored to recover from a failed migration, which is non‑atomic and does not isolate individual module changes. Modules that add custom schema alterations often lack downgrade scripts, leaving irreversible states that cannot be undone by any existing tool.
Key unresolved questions are:
- Does Yunohost v2.0.0 provide any command to roll back all module migrations in a single action?
- If not, what is the recommended workflow or tooling to automate a partial rollback of specific module changes?
- Are there plans to introduce a '--rollback' flag or similar feature in upcoming releases?
1 answer
1 question comment
Use comments to ask for clarification. Post a solution as an answer.
27,025 reputation · 16 Sept 2024, 06:49 UTC
Yunohost v2.0.0 uses atomic transactions for core package updates, but that guarantee does not extend to per-app module migrations. Migration execution is delegated to individual app package scripts, often under /usr/share/yunohost/apps/<app>/migration/, and the platform does not enforce reversible steps.
Because rollback is not standardized across apps, the supported recovery path remains restoring a pre-migration backup created with Yunohost's snapshot system rather than invoking a migration down path. Assessing partial reversibility requires inspecting the specific app's migration directory for reverse hooks, and that assessment should be done in an isolated test environment before production.