Repository navigation
feat(backend,ci): add database migration CI smoke test and rollback procedure (#440) - #512
Merged
Viky207 merged 1 commit intoOct 23, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #440
closes #437
closes #438
closes #439
Adds an automated database migration CI smoke-test job, a rollback script for reverting the most recent migration, CD deployment gating on migration verification, and comprehensive rollback runbook documentation.
Changes
app/backend/run-migration-supabase.js): Applies all migrations inapp/backend/supabase/migrations/in sequential order against a fresh test schema (--smoke-test), tracks applied versions inschema_migrations, and asserts that the resulting schema matches expected tables, views, functions, and indexes.scripts/rollback-migration.sh&scripts/rollback-migration.test.js): Reverts the most recent migration (with support for--dry-run,--steps,--target,--state-file,--schema,--json, and a production confirmation guard) and adds automated tests..github/workflows/ci.yml,.github/workflows/cd.yml): Adds themigration-smoke-testjob toci.ymlandcd.ymland blocks thereleasejob incd.ymlifmigration-smoke-testfails.docs/MIGRATION-RUNBOOK.md,docs/RUNTIME-CONFIG-MATRIX.md,docs/DEPLOYMENT-RUNBOOK.md): Documents the migration architecture, CI/CD gates, and step-by-step rollback procedure.