Public: anyone can read this; the crew can change it.
Drop the retired keeper_beat and feature_schedule_seen tables #16792
Check · Review · Land · Live done — Landed and live in production.
mason/forge:mason/16268-drop-the-retired-keeper-beat-and-feature → main 0 commits fork
5 files
changed +13
−4
scripts/unread-tables-allow.json −2
src/core/feature_fires.ts +2 −2
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | /** |
| 2 | 2 | * What the forge last did for each tool of an absorbed app (`feature_fire`), the last 30 runs of |
| 3 | * each (`feature_run`), and the schedule each tool was first seen with (`feature_schedule_seen`). | |
| 3 | * each (`feature_run`). | |
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | 6 | import type { Database } from "bun:sqlite"; |
| @@ -66,5 +66,5 @@ export function runHistory(db: Database, appId: string): Run[] { | ||
| 66 | 66 | |
| 67 | 67 | /** Forget the app's fires: it is no longer absorbed, or no longer exists. */ |
| 68 | 68 | export function clearFires(db: Database, appId: string): void { |
| 69 | for (const t of ["feature_fire", "feature_run", "feature_schedule_seen"]) db.query(`DELETE FROM ${t} WHERE app_id = ?1`).run(appId); | |
| 69 | for (const t of ["feature_fire", "feature_run"]) db.query(`DELETE FROM ${t} WHERE app_id = ?1`).run(appId); | |
| 70 | 70 | } |
src/core/migration-pins/20261130120000-drop-retired-keeper-beat.pin added +1
| @@ -0,0 +1,1 @@ | ||
| 1 | 23e6f2ba066e4813d7e9c1207929436f46897cf2e07beb4c666518cf88554d3f |
src/core/migrations/20261130120000-drop-retired-keeper-beat.ts added +6
| @@ -0,0 +1,6 @@ | ||
| 1 | // Drops two tables nothing reads: `keeper_beat` (replaced by `keeper_beat_tick`, #11794) and | |
| 2 | // `feature_schedule_seen` (only ever deleted from). Checked unread in v0.7.675 (#16268). | |
| 3 | export default ` | |
| 4 | DROP TABLE IF EXISTS keeper_beat; | |
| 5 | DROP TABLE IF EXISTS feature_schedule_seen; | |
| 6 | `; |
test/schema-additive.test.ts +4
| @@ -150,6 +150,10 @@ const RETIRED: Record<string, { readonly drops: readonly string[]; readonly sinc | ||
| 150 | 150 | drops: ["flow_only_watch", "flow_only"], |
| 151 | 151 | since: "d34910d4 (#7771), shipped from v0.7.302 (#8731)", |
| 152 | 152 | }, |
| 153 | "20261130120000-drop-retired-keeper-beat": { | |
| 154 | drops: ["keeper_beat", "feature_schedule_seen"], | |
| 155 | since: "unread in v0.7.675 (#16268); keeper_beat_tick replaced keeper_beat (#11794)", | |
| 156 | }, | |
| 153 | 157 | }; |
| 154 | 158 | |
| 155 | 159 | /** |
new above
offline