X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/0cc6251412d85492cbd0af0d50176d3c70c25311..180e9830307c556340816c53b29e543c697b9cf8:/widget/comments.sql

diff --git a/widget/comments.sql b/widget/comments.sql
index ff79744..3dc9f07 100644
--- a/widget/comments.sql
+++ b/widget/comments.sql
@@ -1,7 +1,29 @@
+CREATE TABLE issues (
+	page       text        NOT NULL DEFAULT 'issue',
+	link       text,
+	subject    text,
+	body       text,
+	created    timestamptz          DEFAULT now(),
+	closed     timestamptz,
+	updated    timestamptz NOT NULL DEFAULT now(),
+	author     text,
+	assign     text,
+	id         serial      NOT NULL PRIMARY KEY
+);
+
 CREATE TABLE comments (
 	page       text,
 	message    text,
 	created    timestamptz DEFAULT now(),
 	author     text,
-	id         serial      PRIMARY KEY
+	id         serial      NOT NULL PRIMARY KEY
+);
+
+CREATE TABLE journal (
+	comment_id integer     NOT NULL REFERENCES comments (id),
+	property   text        NOT NULL DEFAULT 'attr',
+	col        text        NOT NULL,
+	old_value  text,
+	value      text,
+	id         serial      NOT NULL PRIMARY KEY
 );
