Files
probably-rendering-one-more…/apps/wiki/db/002_page_snapshots.sql
T
codex-bot a2330b22e2
python CI and deployment / verify-and-deploy (push) Successful in 7m23s
studio CI and deployment / verify-and-deploy (push) Failing after 5m28s
wiki CI and deployment / verify-and-deploy (push) Failing after 6m13s
Restructure into Wiki, Studio and Python monorepo with scoped CI
2026-10-25 21:13:43 +08:00

6 lines
666 B
PL/PgSQL

BEGIN;
CREATE TABLE page_snapshots(post_id uuid NOT NULL REFERENCES posts(id),page_index integer NOT NULL CHECK(page_index BETWEEN 1 AND 8),asset_id uuid NOT NULL REFERENCES assets(id),rendered_at timestamptz NOT NULL DEFAULT now(),revision text NOT NULL,PRIMARY KEY(post_id,page_index));
CREATE TABLE render_jobs(post_id uuid PRIMARY KEY REFERENCES posts(id),status text NOT NULL CHECK(status IN ('pending','processing','ready','failed')),revision text NOT NULL,attempts integer NOT NULL DEFAULT 0,target_page integer CHECK(target_page BETWEEN 1 AND 8),locked_at timestamptz,error text);
INSERT INTO schema_migrations(version) VALUES('002_page_snapshots');
COMMIT;