summaryrefslogtreecommitdiff
path: root/util/dump.sql
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-10-21 16:01:08 +0200
committerYorhel <git@yorhel.nl>2009-10-21 16:01:08 +0200
commit6900668e8dad97762e4a4c493c21dec1391998cb (patch)
treebb1c57a92d773c0a4505c3374a230e6087818583 /util/dump.sql
parent96e77619793fbe8351e023d17e257e96cdb37509 (diff)
Added relation graphs for producers
TODO: - document the relations - emit a relgraph notify when needed
Diffstat (limited to 'util/dump.sql')
-rw-r--r--util/dump.sql4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/dump.sql b/util/dump.sql
index 97d317e0..84d862fd 100644
--- a/util/dump.sql
+++ b/util/dump.sql
@@ -47,7 +47,8 @@ CREATE TABLE producers (
id SERIAL NOT NULL PRIMARY KEY,
latest integer NOT NULL DEFAULT 0,
locked boolean NOT NULL DEFAULT FALSE,
- hidden boolean NOT NULL DEFAULT FALSE
+ hidden boolean NOT NULL DEFAULT FALSE,
+ rgraph integer
);
-- producers_relations
@@ -363,6 +364,7 @@ CREATE TABLE wlists (
ALTER TABLE changes ADD FOREIGN KEY (requester) REFERENCES users (id);
ALTER TABLE changes ADD FOREIGN KEY (causedby) REFERENCES changes (id);
ALTER TABLE producers ADD FOREIGN KEY (latest) REFERENCES producers_rev (id) DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE producers ADD FOREIGN KEY (rgraph) REFERENCES relgraphs (id);
ALTER TABLE producers_relations ADD FOREIGN KEY (pid1) REFERENCES producers_rev (id);
ALTER TABLE producers_relations ADD FOREIGN KEY (pid2) REFERENCES producers (id);
ALTER TABLE producers_rev ADD FOREIGN KEY (id) REFERENCES changes (id);