Contexto
unit (linux) and unit (windows) are currently red on dev itself (confirmed on the latest dev commit, run https://github.com/alltomatos/opencode/actions/runs/34911995346/job/104201311221), from test/database-migration.test.ts > "declared schema has no ungenerated migrations". Blocks CI on every open PR regardless of what it touches — including #234 and #237.
Root cause
perf(core): add composite index on session(directory, time_created, id) (closes #229) (commit 5372b2ed3f) added an index declaration to packages/core/src/session/sql.ts:
index("session_directory_time_created_id_idx").on(table.directory, table.time_created, table.id),
but never ran the migration generator, so the declared Drizzle schema and the committed migration/snapshot (schema.json, schema.gen.ts, migration.gen.ts) diverged. The check script's own error names the fix: "Run bun script/migration.ts from packages/core."
Fix
Ran bun script/migration.ts from packages/core (no manual edits to any generated file) and committed the result: a new migration file, and the regenerated schema.json/schema.gen.ts/migration.gen.ts.
Contexto
unit (linux)andunit (windows)are currently red ondevitself (confirmed on the latestdevcommit, run https://github.com/alltomatos/opencode/actions/runs/34911995346/job/104201311221), fromtest/database-migration.test.ts> "declared schema has no ungenerated migrations". Blocks CI on every open PR regardless of what it touches — including #234 and #237.Root cause
perf(core): add composite index on session(directory, time_created, id) (closes #229)(commit5372b2ed3f) added an index declaration topackages/core/src/session/sql.ts:but never ran the migration generator, so the declared Drizzle schema and the committed migration/snapshot (
schema.json,schema.gen.ts,migration.gen.ts) diverged. The check script's own error names the fix: "Runbun script/migration.tsfrom packages/core."Fix
Ran
bun script/migration.tsfrompackages/core(no manual edits to any generated file) and committed the result: a new migration file, and the regeneratedschema.json/schema.gen.ts/migration.gen.ts.