summaryrefslogtreecommitdiff
path: root/util/updates
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-02-05 10:24:44 +0100
committerYorhel <git@yorhel.nl>2010-02-05 10:24:44 +0100
commitb541d72849cd859580e7e6d7232165c92aa3a40b (patch)
tree2a6d3c47b4679387d89488fcd23ec9833c963155 /util/updates
parent004d60b64d80506944fd069c89c589302b5ae313 (diff)
Notifications: Added 'announce' notification
This one is also configurable, but mainly because I want to avoid generating several thousands of notifications for a single action...
Diffstat (limited to 'util/updates')
-rw-r--r--util/updates/update_2.11.sql4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/updates/update_2.11.sql b/util/updates/update_2.11.sql
index 9184dec9..65571fa9 100644
--- a/util/updates/update_2.11.sql
+++ b/util/updates/update_2.11.sql
@@ -1,6 +1,6 @@
-CREATE TYPE notification_ntype AS ENUM ('pm', 'dbdel', 'listdel', 'dbedit');
+CREATE TYPE notification_ntype AS ENUM ('pm', 'dbdel', 'listdel', 'dbedit', 'announce');
CREATE TYPE notification_ltype AS ENUM ('v', 'r', 'p', 't');
CREATE TABLE notifications (
@@ -28,6 +28,7 @@ INSERT INTO notifications (uid, date, ntype, ltype, iid, subid, c_title, c_byuse
ALTER TABLE threads_boards DROP COLUMN lastread;
ALTER TABLE users ADD COLUMN notify_dbedit boolean NOT NULL DEFAULT true;
+ALTER TABLE users ADD COLUMN notify_announce boolean NOT NULL DEFAULT false;
UPDATE users SET notify_dbedit = false WHERE id IN(0,1);
@@ -115,4 +116,5 @@ CREATE TRIGGER notify_listdel AFTER UPDATE ON releases
CREATE TRIGGER notify_dbedit AFTER UPDATE ON vn FOR EACH ROW EXECUTE PROCEDURE notify_dbedit();
CREATE TRIGGER notify_dbedit AFTER UPDATE ON producers FOR EACH ROW EXECUTE PROCEDURE notify_dbedit();
CREATE TRIGGER notify_dbedit AFTER UPDATE ON releases FOR EACH ROW EXECUTE PROCEDURE notify_dbedit();
+CREATE TRIGGER notify_announce AFTER INSERT ON threads_posts FOR EACH ROW EXECUTE PROCEDURE notify_announce();