summaryrefslogtreecommitdiff
path: root/util/updates/update_wip_lists.sql
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-12-17 10:58:48 +0100
committerYorhel <git@yorhel.nl>2019-12-17 10:58:51 +0100
commitf8864f4a6916d3bd703c7b59ff2ad1a4fa7fd301 (patch)
tree6e0d9db0d7d6d569decfee41fc196d22ca20510a /util/updates/update_wip_lists.sql
parent939108b4b971edcaf9c70728816fac7676034cda (diff)
ulist: Synchronize changes between rlists and ulist_vns
These ensure that, for each row in rlists, all the linked VNs have an entry in ulist_vns. This implementation should be more robust than before; It now isn't possible to remove an item from ulist_vns without also removing all relevant rows from rlists, and adding more VNs to an existing release entry will ensure that those VNs are also added to ulist_vns.
Diffstat (limited to 'util/updates/update_wip_lists.sql')
-rw-r--r--util/updates/update_wip_lists.sql1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/updates/update_wip_lists.sql b/util/updates/update_wip_lists.sql
index e6f37184..b472cfc9 100644
--- a/util/updates/update_wip_lists.sql
+++ b/util/updates/update_wip_lists.sql
@@ -119,6 +119,7 @@ DROP FUNCTION update_vnpopularity();
CREATE TRIGGER ulist_labels_create AFTER INSERT ON users FOR EACH ROW EXECUTE PROCEDURE ulist_labels_create();
CREATE TRIGGER ulist_voted_label AFTER INSERT OR UPDATE ON ulist_vns FOR EACH ROW EXECUTE PROCEDURE ulist_voted_label();
+CREATE CONSTRAINT TRIGGER update_vnlist_rlist AFTER DELETE ON ulist_vns DEFERRABLE FOR EACH ROW EXECUTE PROCEDURE update_vnlist_rlist();