From fa7faa24b630cf6279ede34b7444cadaecc286af Mon Sep 17 00:00:00 2001 From: mnoah1 Date: Mon, 12 Oct 2026 15:00:26 +0000 Subject: [PATCH] chore(storage): remove the legacy request queue summary schema Summary: Remove the unused request_summary_by_queue SQL definition after #801 removed its store and all gateway reads and writes. New databases contain only the active read model; document that existing databases still require an explicit retirement migration. Test Plan: Land and consume this schema cleanup only after existing deployments complete physical table retirement and no deployed or supported rollback binary needs the legacy projection. Keep the SQL definition in schema generation inputs until retirement completes. Removing this file does not drop an existing table. Revert Plan: Restore the SQL definition if schema generation still requires it; restoring the definition does not recover retired data. --- .../extension/storage/mysql/schema/README.md | 2 +- .../mysql/schema/request_summary_by_queue.sql | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 submitqueue/gateway/extension/storage/mysql/schema/request_summary_by_queue.sql diff --git a/submitqueue/gateway/extension/storage/mysql/schema/README.md b/submitqueue/gateway/extension/storage/mysql/schema/README.md index 53463a5ee..826c1b0a7 100644 --- a/submitqueue/gateway/extension/storage/mysql/schema/README.md +++ b/submitqueue/gateway/extension/storage/mysql/schema/README.md @@ -38,4 +38,4 @@ Retire unused tables separately from application cleanup: 2. Retain the table and its SQL definition until no deployed or rollback-supported binary depends on them. 3. Delete the table through an explicit, reviewed migration using the deployment's schema tooling, then remove its SQL definition. Removing a schema file alone is not a deletion migration. -`request_summary_by_queue` is unused by the gateway and retained pending retirement through this process. +The legacy `request_summary_by_queue` projection is no longer part of this schema. Existing deployments must retire it through their schema tooling; removing its SQL definition does not drop an existing table. Retain the definition in any schema generator's input until that deployment has completed retirement. diff --git a/submitqueue/gateway/extension/storage/mysql/schema/request_summary_by_queue.sql b/submitqueue/gateway/extension/storage/mysql/schema/request_summary_by_queue.sql deleted file mode 100644 index a56938008..000000000 --- a/submitqueue/gateway/extension/storage/mysql/schema/request_summary_by_queue.sql +++ /dev/null @@ -1,13 +0,0 @@ --- Legacy projection: no longer read or written by the gateway. --- Retain this definition until old binaries and their rollback window are retired. -CREATE TABLE IF NOT EXISTS request_summary_by_queue ( - queue VARCHAR(255) NOT NULL, - received_at_ms BIGINT NOT NULL, - request_id VARCHAR(255) NOT NULL, - change_uris JSON NOT NULL, - status VARCHAR(64) NOT NULL, - version INT NOT NULL, - last_error TEXT NOT NULL, - metadata JSON NOT NULL, - PRIMARY KEY (queue, received_at_ms, request_id) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;