fix(ci): grandfather the already-applied 0074 migration collision - #1544
Merged
Conversation
Both 0074_ai_review_cache (#1462) and 0074_orb_self_enrollment_disabled (#1465) merged and deployed before the duplicate number surfaced. The latter is a bare ALTER TABLE ADD COLUMN, which SQLite cannot guard with IF NOT EXISTS, and D1/self-host track applied migrations by filename — so renaming it now would re-run the ALTER and fail the deploy. Grandfather the pair (same rationale as the pre-existing 0015/0017 entries) so db:migrations:check passes on main again; this unblocks validate on every open PR.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1544 +/- ##
=======================================
Coverage 95.36% 95.36%
=======================================
Files 197 197
Lines 21464 21464
Branches 7759 7759
=======================================
Hits 20470 20470
Misses 416 416
Partials 578 578 🚀 New features to boost your workflow:
|
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
Main's
db:migrations:checkis currently failing — both0074_ai_review_cacheand0074_orb_self_enrollment_disabledmerged and deployed before the duplicate number surfaced, sovalidateis red on every open PR.The newer one (
0074_orb_self_enrollment_disabled.sql) is a bareALTER TABLE … ADD COLUMN, which SQLite can't guard withIF NOT EXISTS, and D1 + the self-host migrator both track applied migrations by filename — so renaming it now would re-run the ALTER and fail the deploy with a duplicate-column error. It can't be safely renumbered once shipped.This grandfathers the 0074 pair in
check-migrations.mjs— the same rationale as the existing 0015/0017 entries (already-applied dups that predate/escaped the guard) — so the check passes on main again. The migrations themselves are unchanged; prod and self-host already hold both columns.Validation
npm run db:migrations:check→ passes (77 migrations OK … no new duplicates)Safety