Sulu failed upgrade: code rollback without database migration reversal
0 reputation · 11 Aug 2024, 08:58 UTC
Goal: decide whether restoring Sulu application code to its pre-upgrade commit is enough to recover from a failed Composer update, or whether the database must also be returned to its pre-upgrade state.
Sulu upgrades typically run through Composer and Symfony console commands, and there is no documented built-in command that atomically rolls back a failed upgrade. Doctrine migrations applied during the update may not be reversible, so reverting composer.lock alone can leave the schema and content in an upgraded state while the code expects the previous version. Cache contents may also remain stale after any restore.
Assumption: the affected site runs a supported Sulu major version with Doctrine migrations managed through Symfony console. Whether individual migrations are marked reversible needs confirmation before a code-only restore is attempted.
- Is a matching database dump required when code and composer.lock are restored to avoid entity or schema mismatches in the Sulu admin?
- Can migration reversibility be confirmed without executing a rollback on production?
- After restoring code and database, is cache clearing sufficient, or are additional Sulu configuration caches affected?