Open History to see the last commit
1ALTER TABLE hn_items ADD COLUMN IF NOT EXISTS body text;
2CREATE TABLE IF NOT EXISTS hn_threads (
3 story_id integer PRIMARY KEY REFERENCES hn_items(id),
4 requested_at timestamptz NOT NULL DEFAULT clock_timestamp(),
5 checked_at timestamptz, committed_at timestamptz,
6 state text NOT NULL DEFAULT 'starting', truncated boolean NOT NULL DEFAULT false
7);
8CREATE TABLE IF NOT EXISTS hn_comments (
9 story_id integer NOT NULL REFERENCES hn_items(id), item_id integer NOT NULL,
10 parent_id integer NOT NULL, path text NOT NULL, depth integer NOT NULL,
11 author text, created integer NOT NULL, text text NOT NULL,
12 deleted boolean NOT NULL, dead boolean NOT NULL, committed_at text NOT NULL,
13 PRIMARY KEY(story_id,item_id)
14);
15CREATE INDEX IF NOT EXISTS hn_comment_order ON hn_comments(story_id,path,item_id);
16ALTER TABLE hn_comments REPLICA IDENTITY FULL;