diff options
author | Yorhel <git@yorhel.nl> | 2009-03-14 16:16:58 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-03-14 16:16:58 +0100 |
commit | c47a479253d16dba9653c9ce86f86849d0d5f03e (patch) | |
tree | 2e0461691895461367ea056bd4c76693af3ac079 /util | |
parent | 4a45377ab172b6f98b755db6139e1ee64df5aa5b (diff) |
Separated table for tag aliases + proper checking of unique aliases and names
Diffstat (limited to 'util')
-rw-r--r-- | util/updates/update_2.3.sql | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/util/updates/update_2.3.sql b/util/updates/update_2.3.sql index 46e2f241..79625714 100644 --- a/util/updates/update_2.3.sql +++ b/util/updates/update_2.3.sql @@ -18,7 +18,6 @@ ALTER TABLE releases_rev ADD COLUMN catalog varchar(50) NOT NULL DEFAULT ''; CREATE TABLE tags ( id SERIAL NOT NULL PRIMARY KEY, name varchar(250) NOT NULL UNIQUE, - alias text NOT NULL DEFAULT '', description text NOT NULL DEFAULT '', meta boolean NOT NULL DEFAULT FALSE, added bigint NOT NULL DEFAULT DATE_PART('epoch'::text, NOW()), @@ -26,6 +25,11 @@ CREATE TABLE tags ( c_vns integer NOT NULL DEFAULT 0 ) WITHOUT OIDS; +CREATE TABLE tags_aliases ( + alias varchar(250) NOT NULL PRIMARY KEY, + tag integer NOT NULL REFERENCES tags (id) DEFERRABLE INITIALLY DEFERRED +) WITHOUT OIDS; + CREATE TABLE tags_parents ( tag integer NOT NULL REFERENCES tags (id) DEFERRABLE INITIALLY DEFERRED, parent integer NOT NULL REFERENCES tags (id) DEFERRABLE INITIALLY DEFERRED, |