db: move read-scope schema to 0057; bound its locks and prebuild path

0056 shipped in #7906 and is checksum-frozen, so restore it byte-for-byte and
move this branch's columns, index and root-index drop to 0057. 0057 sets
lock/statement budgets like 0049, admits a concurrent prebuild of
idx_event_mentions_scope_received, and validates its catalog shape. Parity of
the altered tables is checked against a migrated database.

Signed-off-by: hMB2 <0400eb0da32afbbf16cdd1dee6ffd243587e8f3d6a2823fe7dfa95d16b002b7d@buzz.block.builderlab.xyz>
This commit is contained in:
hMB2
2026-10-07 02:13:41 -07:00
parent 3cb22ecd3b
commit 14f6ef0e37
8 changed files with 276 additions and 55 deletions

View File

@@ -101,7 +101,7 @@ CREATE TABLE channels (
participant_hash BYTEA,
ttl_seconds INT,
ttl_deadline TIMESTAMPTZ,
-- Arrival of the latest eligible timeline message; see 0056.
-- Arrival of the latest eligible timeline message; see 0057.
last_timeline_received_at TIMESTAMPTZ,
PRIMARY KEY (community_id, id),
CONSTRAINT chk_channels_id_not_nil CHECK (id <> '00000000-0000-0000-0000-000000000000'::uuid)