Skip to content

fix(ci): grandfather the already-applied 0074 migration collision - #1544

Merged
JSONbored merged 1 commit into
mainfrom
claude/fix-migration-0074-dup
Jun 26, 2026
Merged

fix(ci): grandfather the already-applied 0074 migration collision#1544
JSONbored merged 1 commit into
mainfrom
claude/fix-migration-0074-dup

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Main's db:migrations:check is currently failing — both 0074_ai_review_cache and 0074_orb_self_enrollment_disabled merged and deployed before the duplicate number surfaced, so validate is red on every open PR.

The newer one (0074_orb_self_enrollment_disabled.sql) is a bare ALTER TABLE … ADD COLUMN, which SQLite can't guard with IF 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

  • No migration files renamed or altered (zero risk of a prod/self-host re-apply). The guard still fails any new, not-yet-shipped duplicate.

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.
@dosubot dosubot Bot added the size:S label Jun 26, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@JSONbored JSONbored self-assigned this Jun 26, 2026
@JSONbored JSONbored added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jun 26, 2026
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.36%. Comparing base (a7d1a1c) to head (a5898a3).
✅ All tests successful. No failed tests found.

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:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored
JSONbored merged commit 8844796 into main Jun 26, 2026
18 checks passed
@JSONbored
JSONbored deleted the claude/fix-migration-0074-dup branch June 26, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant