summaryrefslogtreecommitdiff
path: root/util/dump.sql
diff options
context:
space:
mode:
Diffstat (limited to 'util/dump.sql')
-rw-r--r--util/dump.sql10
1 files changed, 10 insertions, 0 deletions
diff --git a/util/dump.sql b/util/dump.sql
index 54dd9f6b..884c06e8 100644
--- a/util/dump.sql
+++ b/util/dump.sql
@@ -233,6 +233,14 @@ CREATE TABLE votes (
PRIMARY KEY(vid, uid)
);
+-- wlists
+CREATE TABLE wlists (
+ uid integer NOT NULL DEFAULT 0,
+ vid integer NOT NULL DEFAULT 0,
+ wstat smallint NOT NULL DEFAULT 0,
+ added bigint NOT NULL DEFAULT DATE_PART('epoch', NOW()),
+ PRIMARY KEY(uid, vid)
+);
@@ -274,6 +282,8 @@ ALTER TABLE vnlists ADD FOREIGN KEY (uid) REFERENCES users
ALTER TABLE vnlists ADD FOREIGN KEY (vid) REFERENCES vn (id) DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE votes ADD FOREIGN KEY (uid) REFERENCES users (id) DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE votes ADD FOREIGN KEY (vid) REFERENCES vn (id) DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE wlists ADD FOREIGN KEY (uid) REFERENCES users (id) DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE wlists ADD FOREIGN KEY (vid) REFERENCES vn (id) DEFERRABLE INITIALLY DEFERRED;