Skip to content

fix(db): reconcile drizzle migration journal - #12

Merged
kivo360 merged 1 commit into
mainfrom
fix/drizzle-journal
Jun 2, 2026
Merged

fix(db): reconcile drizzle migration journal#12
kivo360 merged 1 commit into
mainfrom
fix/drizzle-journal

Conversation

@kivo360

@kivo360 kivo360 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Journal listed only 5 of 10 migrations (missing 0004-0006, 0008, 0009), so the next db:generate would collide with 0005_add_admin_columns.sql and diff against a stale snapshot (missing 0008/0009 tables).

Rebuilt _journal.json to all 10 entries + regenerated the snapshot chain so the latest snapshot = current schema.

Verified: drizzle-kit generate → 'No schema changes'; fresh local D1 applies 0000-0009 cleanly. The wrangler apply path was always correct (prod unaffected); this only repairs drizzle-kit metadata for future schema changes.

The journal listed only 0000-0003 + 0007 (5 entries), so the next
`drizzle-kit generate` would emit 0005_*.sql — colliding with the existing
0005_add_admin_columns.sql — and diff against a snapshot missing the 0008/0009
tables. Rebuilt _journal.json to all 10 migrations and regenerated the snapshot
chain so the latest snapshot equals the current schema.

Verified: `drizzle-kit generate` reports no changes; a fresh local D1 applies
0000-0009 cleanly. Apply path (wrangler) was always correct; this only fixes
drizzle-kit metadata for future schema work.
@kivo360
kivo360 merged commit c4f42b0 into main Jun 2, 2026
6 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