fix(db): add missing migration to Drizzle journal — fixes CI test failures #337
Reference in New Issue
Block a user
Delete Branch "fix/ci-drizzle-migration-journal"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
CI test step has been failing since ~build #437. The
pnpm teststep fails because Drizzle migrations run against a fresh postgres, and the migration ordering is broken.Root Cause
0001_cynical_ultimatum.sqlexists on disk but was not registered in the Drizzle journal (_journal.json). This file creates tables:agent_logs,insights,preferences,skills,summarization_jobs.Drizzle follows the journal, so it skips this file entirely. Then
0002_nebulous_mimic.sqltries toALTER TABLE preferences ADD COLUMN mutable— butpreferenceswas never created.Local tests pass because dev databases already have these tables from prior runs.
Fix
Inserted
0001_cynical_ultimatumatidx: 1in the journal and shifted all subsequent entries toidx: 2-7. Verified snapshot metadata is already consistent.Verification
pnpm test— 347 passed (347), 35 tasks successfulpnpm lint— cleanpnpm typecheck— cleanprettier --check— clean