page text NOT NULL DEFAULT 'issue',
link text,
subject text,
- body text,
created timestamptz DEFAULT now(),
- closed timestamptz DEFAULT now(),
+ closed timestamptz,
updated timestamptz NOT NULL DEFAULT now(),
author text,
assign text,
CREATE TABLE comments (
page text,
+ raw text,
message text,
+ announced boolean NOT NULL DEFAULT TRUE,
created timestamptz DEFAULT now(),
author text,
id serial NOT NULL PRIMARY KEY
value text,
id serial NOT NULL PRIMARY KEY
);
+
+CREATE OR REPLACE VIEW messages AS (
+ SELECT *, regexp_replace(page, '.*/', '')::int issue FROM comments
+);