Open History to see the last commit
1-- Private, fenced work queue. Neither table participates in public live queries.
2CREATE TABLE IF NOT EXISTS hn_ingest_pending (
3 key text PRIMARY KEY,
4 due_at bigint NOT NULL,
5 received_at bigint NOT NULL,
6 revision bigint NOT NULL,
7 payload jsonb NOT NULL
8);
9CREATE INDEX IF NOT EXISTS hn_ingest_pending_due ON hn_ingest_pending(due_at);
10
11-- The first worker reconciliation fills a discussion immediately, including
12-- rows omitted by the small cold-page seed. Only subsequent live changes wait.
13ALTER TABLE hn_threads ADD COLUMN IF NOT EXISTS ingest_initialized boolean NOT NULL DEFAULT false;