Public: anyone can read this; the crew can change it.
Drop the flow_only column and the flow_only_watch table: nothing reads them since d34910d4 #8770
Check · Review · Land · Live done — Landed and live in production.
A new migration, `src/core/migrations/20261103100000-drop-flow-only.ts`, removes the last schema left by the Flow only switch. It runs `DROP TABLE IF EXISTS flow_only_watch` and `ALTER TABLE repo DROP COLUMN flow_only`, and its pin is committed beside it. Nothing has read either one since d34910d4 (#7771), and every release from v0.7.302 on includes that commit.
shipped production is serving it deploy 9b150b4
A new migration, src/core/migrations/20261103100000-drop-flow-only.ts, removes the last schema left by the Flow only switch. It runs DROP TABLE IF EXISTS flow_only_watch and ALTER TABLE repo DROP COLUMN flow_only, and its pin is committed beside it. Nothing has read either one since d34910d4 (#7771), and every release from v0.7.302 on includes that commit.
What to look at: this is the first migration that drops something since the release list in releases-before-tags.json was frozen. Until now, test/schema-additive.test.ts required every migration after that freeze to only add things, so it had no way to allow a drop. I added a short RETIRED list to that test. Each entry names the migration, what it drops, and the commit where the code that read it was removed. Listed migrations skip the additive check. A new test makes the exception safe: it fails if any file under src, outside the migrations folder, names flow_only or flow_only_watch again. A name followed by a dot is an event kind and is allowed, so flow_only.cleared still passes. I checked that this test fails when someone adds flow_only back to a source file.
Events: src/core/event_audience.ts is unchanged. Old flow_only.cleared rows still go to admins, and nothing writes that event kind any more. grep -rn flow_only src now finds only the three migrations and that one audience line.
Tests: test/schema-migrations.test.ts gains two tests:
- A database migrated up to just before the drop, holding a repository with the switch on and a watch row, loses both the column and the table on the next boot and keeps the repository.
- A fresh database never has either.
How to try it: run bun test test/schema-migrations.test.ts test/schema-additive.test.ts. Locally, bun scripts/gate.ts, bun x tsc --noEmit and the 13 test files scripts/fast.ts named all pass (168 tests). I did not run the full suite here; the forge runs it on the push.
Not done: 0044-flow-only.ts and 0046-flow-only-alarm.ts stay as they are. They are pinned history, and the issue's grep criterion expects them to remain.
🤖 Generated with Claude Code
Migration drops the table and column with a pin; the preview answers 200; grep names only the migrations and the audience line; both new migration tests prove the drop and that repos survive. The RETIRED guard keeps the additive rule honest. Next: (1) have the guard test also scan test-free docs/ for stale mentions if any; (2) once old flow_only.cleared rows age out, consider retiring that audience line.
A new migration,
src/core/migrations/20261103100000-drop-flow-only.ts, removes the last schema left by the Flow only switch. It runsDROP TABLE IF EXISTS flow_only_watchandALTER TABLE repo DROP COLUMN flow_only, and its pin is committed beside it. Nothing has read either one since d34910d4 (#7771), and every release from v0.7.302 on includes that commit.What to look at: this is the first migration that drops something since the release list in
releases-before-tags.jsonwas frozen. Until now,test/schema-additive.test.tsrequired every migration after that freeze to only add things, so it had no way to allow a drop. I added a shortRETIREDlist to that test. Each entry names the migration, what it drops, and the commit where the code that read it was removed. Listed migrations skip the additive check. A new test makes the exception safe: it fails if any file undersrc, outside the migrations folder, namesflow_onlyorflow_only_watchagain. A name followed by a dot is an event kind and is allowed, soflow_only.clearedstill passes. I checked that this test fails when someone addsflow_onlyback to a source file.Events:
src/core/event_audience.tsis unchanged. Oldflow_only.clearedrows still go to admins, and nothing writes that event kind any more.grep -rn flow_only srcnow finds only the three migrations and that one audience line.Tests:
test/schema-migrations.test.tsgains two tests:How to try it: run
bun test test/schema-migrations.test.ts test/schema-additive.test.ts. Locally,bun scripts/gate.ts,bun x tsc --noEmitand the 13 test filesscripts/fast.tsnamed all pass (168 tests). I did not run the full suite here; the forge runs it on the push.Not done:
0044-flow-only.tsand0046-flow-only-alarm.tsstay as they are. They are pinned history, and the issue's grep criterion expects them to remain.🤖 Generated with Claude Code
Closes #8731