summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authoryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-07-29 11:15:07 +0000
committeryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-07-29 11:15:07 +0000
commit7aea19c2f8e71a7d630b613a57325c4dce1b1363 (patch)
treeb4c2e35d40afc7b3a0a22eb8f509c49b37f5f7db /util
parenta0f440de277653b3c79fd117d026855ec6b78373 (diff)
- Added release list feature
- Added noindex tag to iid-ttag browser - Replaced last poster with age of last post on home page - Merged user vote lists into new vnlist - Removed 'hide votes' feature - Fixed users+1 stats bug - Fixed FF3 JS hack - Old VNList code is still present, need to decide what to do with that git-svn-id: svn://vndb.org/vndb@74 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
Diffstat (limited to 'util')
-rw-r--r--util/dump.sql12
-rw-r--r--util/updates/update_1.20.sql13
2 files changed, 25 insertions, 0 deletions
diff --git a/util/dump.sql b/util/dump.sql
index ce0f8be4..54dd9f6b 100644
--- a/util/dump.sql
+++ b/util/dump.sql
@@ -113,6 +113,16 @@ CREATE TABLE releases_vn (
PRIMARY KEY(rid, vid)
);
+-- rlists
+CREATE TABLE rlists (
+ uid integer NOT NULL DEFAULT 0,
+ rid integer NOT NULL DEFAULT 0,
+ vstat smallint NOT NULL DEFAULT 0,
+ rstat smallint NOT NULL DEFAULT 0,
+ added bigint NOT NULL DEFAULT DATE_PART('epoch', NOW()),
+ PRIMARY KEY(uid, rid)
+);
+
-- threads
CREATE TABLE threads (
id SERIAL NOT NULL PRIMARY KEY,
@@ -247,6 +257,8 @@ ALTER TABLE releases_rev ADD FOREIGN KEY (id) REFERENCES changes
ALTER TABLE releases_rev ADD FOREIGN KEY (rid) REFERENCES releases (id) DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE releases_vn ADD FOREIGN KEY (rid) REFERENCES releases_rev (id) DEFERRABLE INITIALLY DEFERRED;
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 threads_posts ADD FOREIGN KEY (tid) REFERENCES threads (id) DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE threads_posts ADD FOREIGN KEY (uid) REFERENCES users (id) DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE threads_tags ADD FOREIGN KEY (tid) REFERENCES threads (id) DEFERRABLE INITIALLY DEFERRED;
diff --git a/util/updates/update_1.20.sql b/util/updates/update_1.20.sql
index 9c02e184..4abd2211 100644
--- a/util/updates/update_1.20.sql
+++ b/util/updates/update_1.20.sql
@@ -2,3 +2,16 @@
-- deleted user
INSERT INTO users (id, username, mail, rank)
VALUES (0, 'deleted', 'del@vndb.org', 0);
+
+
+
+-- release lists
+CREATE TABLE rlists (
+ uid integer NOT NULL DEFAULT 0 REFERENCES users (id) DEFERRABLE INITIALLY DEFERRED,
+ rid integer NOT NULL DEFAULT 0 REFERENCES releases (id) DEFERRABLE INITIALLY DEFERRED,
+ vstat smallint NOT NULL DEFAULT 0,
+ rstat smallint NOT NULL DEFAULT 0,
+ added bigint NOT NULL DEFAULT DATE_PART('epoch', NOW()),
+ PRIMARY KEY(uid, rid)
+) WITHOUT OIDS;
+