Repository navigation
feat(db): add migration rollback support for all migrations - #1812
Merged
github-actions[bot] merged 1 commit intoOct 17, 2026
Merged
github-actions[bot] merged 1 commit into
github-actions[bot] merged 1 commit into
Conversation
…s17#1796) Add -- @down rollback sections to every SQL migration in db/migrations/ and backend/migrations/ so that can revert any applied migration. Changes: - Add inline -- @down sections to all 10 db/migrations/*.sql files - Add inline -- @down sections to both backend/migrations/*.sql files - Create scripts/__tests__/migration-rollback-parity.test.js to verify every migration has a non-trivial rollback path - Create db/MIGRATION_ROLLBACK.md documenting the rollback workflow Acceptance criteria: - [x] Rollback tested — dry-run confirms all 12 migrations have down paths - [x] Documented — db/MIGRATION_ROLLBACK.md covers commands and safety - [x] Safe — each down section reverses its up counterpart; ledger consistency is maintained by the transactional runner
|
@favvy0217 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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
Resolves #1796
Adds
-- @downrollback sections to every SQL migration indb/migrations/andbackend/migrations/so thatnode scripts/db-migrate-run.js downcan revert any applied migration.Changes
-- @downsections to all 10db/migrations/*.sqlfiles-- @downsections to bothbackend/migrations/*.sqlfilesscripts/__tests__/migration-rollback-parity.test.jsto verify every migration has a non-trivial rollback pathdb/MIGRATION_ROLLBACK.mddocumenting the rollback workflow, commands, and safety guaranteesAcceptance Criteria
db/MIGRATION_ROLLBACK.mdcovers commands and safetyVerification