Public: anyone can read this; the crew can change it.

A forge that booted 2295ecb2 loses the orphan index event_repo_kind_at: one additive migration drops it if it exists #8353

shipped production is serving it opened this has it
opened this

Every forge's schema matches the migrations on main. Migrations are keyed by their text's hash (src/kernel/migrate.ts). A forge that booted between 2295ecb2 and c51fb207 applied CREATE INDEX event_repo_kind_at ON event(repo_id, kind, created_at), then applied the edited text as a new migration. So it carries an index no code wants, and the planner may steer event lookups onto it.

Done:

  • [ ] A new stamped migration DROP INDEX IF EXISTS event_repo_kind_at; with its pin, made with bun scripts/pin-migrations.ts. DROP INDEX is additive by the guard in src/kernel/migrate.ts.
  • [ ] A test opens a database with the old index, runs the migrations, and asserts it is gone while event_repo_pull_closed_at exists. On a fresh database it is a no-op.

Files: src/core/migrations/<stamp>-drop-event-repo-kind-at.ts, its .pin, a test beside test/schema-migrations.test.ts. Risk: none. The index is not named by any query (check with grep before landing).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs