# HG changeset patch # User jbe # Date 1462394799 -7200 # Node ID 30b67ca0c242204a2b8ea81aa2b765625482e7d4 # Parent 2f1c06608defd190417598c1d8706f5073a3b64c Set notification settings to zero/NULL/DEFAULT for deleted members diff -r 2f1c06608def -r 30b67ca0c242 update/core-update.v3.2.1-v3.2.2.sql --- a/update/core-update.v3.2.1-v3.2.2.sql Wed May 04 21:49:25 2016 +0200 +++ b/update/core-update.v3.2.1-v3.2.2.sql Wed May 04 22:46:39 2016 +0200 @@ -4,6 +4,18 @@ SELECT * FROM (VALUES ('3.2.2', 3, 2, 2)) AS "subquery"("string", "major", "minor", "revision"); +UPDATE "member" SET + "disable_notifications" = TRUE, + "notification_counter" = DEFAULT, + "notification_sample_size" = 0, + "notification_dow" = NULL, + "notification_hour" = NULL + WHERE "last_login" ISNULL + AND "login" ISNULL + AND "authority_login" ISNULL + AND "locked" = TRUE + AND "active" = FALSE; + CREATE OR REPLACE FUNCTION "featured_initiative" ( "recipient_id_p" "member"."id"%TYPE, "area_id_p" "area"."id"%TYPE )