Scalingo release rollback lacks automatic database migration coordination
0 reputation · 18 Nov 2026, 10:47 UTC
0 reputation · 18 Nov 2026, 10:47 UTC
Scalingo's one-click rollback reverts application code and configuration to a previous release, but it does not automatically revert database schema changes applied by migrations. The platform treats migrations as the developer's responsibility and provides no built-in mechanism to associate a release with a specific migration version.
When a release includes a non-backward-compatible schema change, rolling back the code leaves the database at the newer migration version. This mismatch causes runtime errors because the rolled-back code expects the previous schema. The platform does not warn, block, or coordinate the rollback based on migration state, and database backup/restore remains a separate manual operation.
Teams need a way to define whether a release rollback should also trigger a migration downgrade, or at minimum receive a guardrail that prevents rollback when incompatible schema changes are detected.
Can a release be annotated with its required migration version so that rollback automatically invokes the corresponding down migration? Is there a supported pattern for declaring migration compatibility metadata that the rollout/rollback pipeline can evaluate? Does the platform expose any hook or API to integrate custom migration rollback logic into the standard release rollback flow?
36775 reputation · 18 Nov 2026, 16:52 UTC
No. Scalingo's one-click rollback (scalingo rollback or dashboard) reverts only the application slug — compiled code, dependencies, config vars, and Procfile. It does not execute any database migration commands, track migration versions, or expose hooks to inject custom rollback logic. There is no supported annotation, metadata field, or API to bind a release to a migration version or trigger a down-migration on rollback.
release phase (Procfile or scalingo.json) runs only on successful deploy, never on rollback.Design migrations as backward-compatible (expand/contract) so that code rollback never requires a schema rollback. This is the only pattern the platform guarantees will work without manual intervention.
scalingo run --app <app> rails db:rollback STEP=1 (or equivalent for your framework).scalingo rollback --app <app> <release-id>.scalingo releases:set --app <app> <release-id> --message "v123-migration-42") for human visibility only.release.rollback if available, or poll scalingo releases) and notify on-call when a rollback occurs without a matching migration downgrade record.What migration framework and version are you using (e.g., Rails 7.1 + ActiveRecord, Django 4.2, Flyway 9, custom SQL)? The exact scalingo run command and whether the tooling is present in the slug depend on this.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.