Skip to content

Release dev → main: fix the db migrations check (count cards migrations from the journal) - #161

Merged
AtmegaBuzz merged 2 commits into
mainfrom
dev
Nov 2, 2026
Merged

AtmegaBuzz merged 2 commits into
mainfrom
dev

Conversation

@AtmegaBuzz

Copy link
Copy Markdown
Member

Follow-up to #160, which was merged before this fix landed.

Why

The db workflow's migrations job has been failing since 0034_builder_recaps (77d2389). That commit added the 35th cards migration, but packages/db/test/cards-network-sql.test.ts still expected exactly 34 rows in drizzle.__cards_migrations. #160 merged with this check red.

Change

  • 32bb5e3: the test now compares against the cards journal's entry count (readJournal(migrationsFolder('cards')).entries.length), not a hard-coded number. The check exists to prove that applying the migrations twice records each one once, and the next migration won't break it again.
  • afd5f7a: merges main back into dev, which changes no files.

The change is test-only: no migration, schema or app code changes, and nothing is applied to any database.

Verified

  • The db workflow on dev at 32bb5e3: success (run 41383098275).
  • Locally against a scratch Postgres with pgvector, packages/db npm test gave 28 pass, 0 fail and 0 skipped.

🤖 Generated with Claude Code

AtmegaBuzz and others added 2 commits November 2, 2026 08:56
0034_builder_recaps (77d2389) added the 35th cards migration but left the
network test asserting 34 rows in drizzle.__cards_migrations, so the
migrations workflow failed on the dev -> main PR (#160). The assertion is
about applying twice recording each migration once, so compare against
the journal's entry count; the next migration won't break it again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AtmegaBuzz
AtmegaBuzz merged commit 300c631 into main Nov 2, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant