summaryrefslogtreecommitdiff
path: root/util/sql/schema.sql
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-02-01 17:45:26 +0100
committerYorhel <git@yorhel.nl>2010-02-01 17:45:26 +0100
commit0c5c9bab2c022e251024cc2bd222bd7585ca6837 (patch)
tree841a3aebf4c9933e8cfdb37b02ef1b6fe272cecf /util/sql/schema.sql
parent1dd46f31b7bc117d4a02515175b925bf1be2de92 (diff)
Cache the title and userid of the notifications
These aren't likely to change anyway, and things will become less easy to display when other types of notifications are added.
Diffstat (limited to 'util/sql/schema.sql')
-rw-r--r--util/sql/schema.sql5
1 files changed, 4 insertions, 1 deletions
diff --git a/util/sql/schema.sql b/util/sql/schema.sql
index 557b75a1..c496e01d 100644
--- a/util/sql/schema.sql
+++ b/util/sql/schema.sql
@@ -34,7 +34,9 @@ CREATE TABLE notifications (
ntype notification_ntype NOT NULL,
ltype notification_ltype NOT NULL,
iid integer NOT NULL,
- subid integer
+ subid integer,
+ c_title text NOT NULL,
+ c_byuser integer
);
-- producers
@@ -354,6 +356,7 @@ CREATE TABLE wlists (
ALTER TABLE changes ADD FOREIGN KEY (requester) REFERENCES users (id);
ALTER TABLE notifications ADD FOREIGN KEY (uid) REFERENCES users (id);
+ALTER TABLE notifications ADD FOREIGN KEY (c_byuser) REFERENCES users (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);