Add missing drizzle snapshot - #255
Open
Akeeru wants to merge 2 commits into
Open
Conversation
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
The compliance-documents migration series (
20260804073000_fix_notification_key_unique_indexthrough20260804090200_drop_insurance_pucc_tables) was committed tosrc/server/db/migrationsand registered in_journal.json, but no matching snapshot was added tomigrations/meta. The newest snapshot ondevwas still20260801044257_snapshot.json, which describes the pre-migration schema (insurances/puccstables, nocompliance_documents).Because Drizzle diffs the current schema against the latest snapshot,
pnpm db:generatewould compute the diff from a stale baseline and emit a migration that re-createsinsurances/puccsand dropscompliance_documents— corrupting the migration chain for anyone generating a new migration.Changes
src/server/db/migrations/meta/20260804090200_snapshot.json, matching the final journal entry (idx: 21,20260804090200_drop_insurance_pucc_tables).compliance_documentspresentinsurances/puccsremovedNo schema, migration SQL, or application code was changed — snapshot metadata only.
Verification
pnpm check— passespnpm lint— passespnpm db:generateon a clean checkout now produces no spurious migrationpnpm db:migrateon a fresh database applies the full chain and ends withcompliance_documentsin placeRisk
Low. Snapshot files are only consumed by the Drizzle Kit generator; they are not executed at runtime and do not affect existing deployments.