diff options
author | Yorhel <git@yorhel.nl> | 2009-07-08 11:29:36 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-07-08 11:29:36 +0200 |
commit | f89f04a1c646e59cdc009ddd677748527e2c3c2e (patch) | |
tree | c9f5986c7fc3a3bca3400ecb891ed2b76be066db /util | |
parent | 5d6f09f838392f1e2c072f44f904b5f9eab95f45 (diff) |
Keep track of users who requested tags
Diffstat (limited to 'util')
-rw-r--r-- | util/dump.sql | 4 | ||||
-rw-r--r-- | util/updates/update_2.5.sql | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/util/dump.sql b/util/dump.sql index 6fe4bc08..22e80099 100644 --- a/util/dump.sql +++ b/util/dump.sql @@ -175,7 +175,8 @@ CREATE TABLE tags ( meta boolean NOT NULL DEFAULT FALSE, added bigint NOT NULL DEFAULT DATE_PART('epoch'::text, NOW()), state smallint NOT NULL DEFAULT 0, - c_vns integer NOT NULL DEFAULT 0 + c_vns integer NOT NULL DEFAULT 0, + addedby integer NOT NULL DEFAULT 1 ); -- tags_aliases @@ -375,6 +376,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 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; ALTER TABLE tags_parents ADD FOREIGN KEY (parent) REFERENCES tags (id) DEFERRABLE INITIALLY DEFERRED; diff --git a/util/updates/update_2.5.sql b/util/updates/update_2.5.sql index dab07608..b45da7b0 100644 --- a/util/updates/update_2.5.sql +++ b/util/updates/update_2.5.sql @@ -59,3 +59,9 @@ BEGIN END; $$ LANGUAGE plpgsql; + + +-- added by field for tags + +ALTER TABLE tags ADD COLUMN addedby integer NOT NULL DEFAULT 1 REFERENCES users (id) DEFERRABLE INITIALLY DEFERRED; + |