Files
substrata/scripts/db/002-page-threads.sql
T
Cato 053c95e68c feat: Equal Earth map, threadkit comments, AI fact-check (#54)
Replace the hand-drawn SVG with react-simple-maps (Equal Earth).
Notes, learn, and bottleneck pages get comments (threadkit) and a
corpus-grounded fact-check button. Ask shows whether ai-kit is
configured. Same complete() engine as Cat and Loki — not the Cat UI.
2026-09-16 08:23:31 -07:00

13 lines
564 B
PL/PgSQL

BEGIN;
CREATE TABLE IF NOT EXISTS research_page_messages (
id uuid PRIMARY KEY,
path text NOT NULL,
author_id text NOT NULL,
author_kind text NOT NULL CHECK (author_kind IN ('human', 'ai', 'system')),
body text NOT NULL CHECK (length(body) BETWEEN 1 AND 8000),
created_at timestamptz NOT NULL DEFAULT now()
);
CREATE INDEX IF NOT EXISTS research_page_messages_path ON research_page_messages (path, created_at);
COMMENT ON TABLE research_page_messages IS 'Public page threads. Permission is participation via threadkit; storage is this table.';
COMMIT;