fix(db): reconcile drizzle migration journal - #12
Merged
Conversation
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.
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.
Journal listed only 5 of 10 migrations (missing 0004-0006, 0008, 0009), so the next
db:generatewould collide with0005_add_admin_columns.sqland diff against a stale snapshot (missing 0008/0009 tables).Rebuilt
_journal.jsonto 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.