summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-04-25 13:53:32 +0200
committerYorhel <git@yorhel.nl>2020-04-25 13:53:34 +0200
commit0f88e511bd1b3fdcc290ee1cc5da69690e191137 (patch)
treefe1704d23be1f182191e4a7a4bfc5af9bcae2dd3 /util
parent00fbcdf96432efad85abdbc7392d493409a4c253 (diff)
imgflag: Add moderator vote overruling
Works exactly like tag vote overruling.
Diffstat (limited to 'util')
-rw-r--r--util/updates/2020-04-25-imgflag-overrule.sql4
1 files changed, 4 insertions, 0 deletions
diff --git a/util/updates/2020-04-25-imgflag-overrule.sql b/util/updates/2020-04-25-imgflag-overrule.sql
new file mode 100644
index 00000000..19f8d8a5
--- /dev/null
+++ b/util/updates/2020-04-25-imgflag-overrule.sql
@@ -0,0 +1,4 @@
+ALTER TABLE image_votes ADD COLUMN ignore boolean NOT NULL DEFAULT false;
+DROP TRIGGER image_votes_cache2 ON image_votes;
+CREATE TRIGGER image_votes_cache2 AFTER UPDATE ON image_votes FOR EACH ROW WHEN ((OLD.id, OLD.sexual, OLD.violence, OLD.ignore) IS DISTINCT FROM (NEW.id, NEW.sexual, NEW.violence, NEW.ignore)) EXECUTE PROCEDURE update_images_cache();
+\i sql/func.sql