fabro/lib/foundation/fabro-db
Bryan Helmkamp 4942788297
Drop the run_events table and narrow the runs row
Every run is a Petri run whose history is `petri_records` and
`platform_records`, so the legacy run event log has no reader left.
The new migration drops `run_events` (with its indexes), the two
one-time activation tables, and rebuilds `runs` without the columns
only that log wrote or read: `source_last_seq` and the six token and
file-count columns nothing read, as VIEWS.md records. Pre-cutover
development runs are discarded, as decided; the surviving columns of
existing rows are copied across.

fabro-db loses the three migration consts of the dropped schema and the
session-owner preflight that inspected `run_events`, and gains
`DROP_RUN_EVENTS_MIGRATION_SQL` so fixtures that install the runs
schema reach the production shape. The run summary upsert binds only
the surviving columns.

Tests: the `run_events` schema, query-plan and preflight tests are
deleted; `runs_schema_has_its_final_shape_without_the_legacy_event_log`
pins the final columns and indexes, and
`dropping_the_event_log_keeps_the_run_rows` migrates a database left by
an older binary and checks the run row survives.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-18 14:37:18 -04:00
..
migrations Drop the run_events table and narrow the runs row 2026-09-18 14:37:18 -04:00
src Drop the run_events table and narrow the runs row 2026-09-18 14:37:18 -04:00
tests Drop the run_events table and narrow the runs row 2026-09-18 14:37:18 -04:00
build.rs Run plugin providers end to end and gate them in CI 2026-09-09 19:54:57 -06:00
Cargo.toml Harden SQLite blob activation safety 2026-08-24 14:02:35 -04:00