summaryrefslogtreecommitdiff
path: root/util/dump.sql
diff options
context:
space:
mode:
Diffstat (limited to 'util/dump.sql')
-rw-r--r--util/dump.sql12
1 files changed, 11 insertions, 1 deletions
diff --git a/util/dump.sql b/util/dump.sql
index 22e80099..e69947f6 100644
--- a/util/dump.sql
+++ b/util/dump.sql
@@ -161,6 +161,14 @@ CREATE TABLE screenshots (
height smallint NOT NULL DEFAULT 0
);
+-- sessions
+CREATE TABLE sessions (
+ uid integer NOT NULL,
+ token character(40) NOT NULL,
+ expiration bigint DEFAULT 0 NOT NULL,
+ PRIMARY KEY (uid, token)
+);
+
-- stats_cache
CREATE TABLE stats_cache (
section varchar(25) NOT NULL PRIMARY KEY,
@@ -256,7 +264,8 @@ CREATE TABLE users (
skin varchar(128) NOT NULL DEFAULT '',
customcss text NOT NULL DEFAULT '',
ip inet NOT NULL DEFAULT '0.0.0.0',
- c_tags integer NOT NULL DEFAULT 0
+ c_tags integer NOT NULL DEFAULT 0,
+ salt character(9) NOT NULL DEFAULT ''
);
-- vn
@@ -376,6 +385,7 @@ ALTER TABLE releases_vn ADD FOREIGN KEY (rid) REFERENCES releases_r
ALTER TABLE releases_vn ADD FOREIGN KEY (vid) REFERENCES vn (id) DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE rlists ADD FOREIGN KEY (uid) REFERENCES users (id) DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE rlists ADD FOREIGN KEY (rid) REFERENCES releases (id) DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE sessions ADD FOREIGN KEY (uid) REFERENCES users (id) DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE tags ADD FOREIGN KEY (addedby) REFERENCES users (id) DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE tags_aliases ADD FOREIGN KEY (tag) REFERENCES tags (id) DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE tags_parents ADD FOREIGN KEY (tag) REFERENCES tags (id) DEFERRABLE INITIALLY DEFERRED;