summaryrefslogtreecommitdiff
path: root/util/updates
diff options
context:
space:
mode:
authoryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-07-08 07:27:56 +0000
committeryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-07-08 07:27:56 +0000
commitdb47e11b580efa1938de892e6c08ba47ba2c6cc4 (patch)
tree3d2133912d93585e7bf36b41a6b1f85c40a0031a /util/updates
parent4c821b8138b0f9820cada6be7e051fe00434c54e (diff)
Wrote an integrated messageboard, and fixed a few (very) small things along the way
git-svn-id: svn://vndb.org/vndb@54 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
Diffstat (limited to 'util/updates')
-rw-r--r--util/updates/update_1.19.sql28
1 files changed, 28 insertions, 0 deletions
diff --git a/util/updates/update_1.19.sql b/util/updates/update_1.19.sql
new file mode 100644
index 00000000..4b5a08b5
--- /dev/null
+++ b/util/updates/update_1.19.sql
@@ -0,0 +1,28 @@
+
+
+-- Messageboard
+CREATE TABLE threads (
+ id SERIAL NOT NULL PRIMARY KEY,
+ title varchar(50) NOT NULL DEFAULT '',
+ count smallint NOT NULL DEFAULT 0,
+ locked smallint NOT NULL DEFAULT 0,
+ hidden smallint NOT NULL DEFAULT 0
+) WITHOUT OIDS;
+
+CREATE TABLE threads_tags (
+ tid integer NOT NULL DEFAULT 0 REFERENCES threads (id) DEFERRABLE INITIALLY DEFERRED,
+ type char(2) NOT NULL DEFAULT 0,
+ iid integer NOT NULL DEFAULT 0 -- references to (vn|releases|producers|users).id
+) WITHOUT OIDS;
+
+CREATE TABLE threads_posts (
+ tid integer NOT NULL DEFAULT 0 REFERENCES threads (id) DEFERRABLE INITIALLY DEFERRED,
+ num integer NOT NULL DEFAULT 0,
+ uid integer NOT NULL DEFAULT 0 REFERENCES users (id) DEFERRABLE INITIALLY DEFERRED,
+ date bigint NOT NULL DEFAULT DATE_PART('epoch', NOW()),
+ edited bigint NOT NULL DEFAULT 0,
+ hidden smallint NOT NULL DEFAULT 0,
+ msg text NOT NULL DEFAULT '',
+ PRIMARY KEY(tid, num)
+) WITHOUT OIDS;
+