liquid_feedback_core
diff update/core-update.v2.0.7-v2.0.8.sql @ 238:fefc15eb747b
Bugfix: Delete member fields "lang", "notify_level" and "formatting_engine" in function "delete_private_data"; Update script to v2.0.8
author | jbe |
---|---|
date | Thu Mar 15 15:18:09 2012 +0100 (2012-03-15) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/update/core-update.v2.0.7-v2.0.8.sql Thu Mar 15 15:18:09 2012 +0100 1.3 @@ -0,0 +1,64 @@ 1.4 +BEGIN; 1.5 + 1.6 +CREATE OR REPLACE VIEW "liquid_feedback_version" AS 1.7 + SELECT * FROM (VALUES ('2.0.8', 2, 0, 8)) 1.8 + AS "subquery"("string", "major", "minor", "revision"); 1.9 + 1.10 +CREATE OR REPLACE FUNCTION "delete_private_data"() 1.11 + RETURNS VOID 1.12 + LANGUAGE 'plpgsql' VOLATILE AS $$ 1.13 + BEGIN 1.14 + DELETE FROM "member" WHERE "activated" ISNULL; 1.15 + UPDATE "member" SET 1.16 + "invite_code" = NULL, 1.17 + "invite_code_expiry" = NULL, 1.18 + "admin_comment" = NULL, 1.19 + "last_login" = NULL, 1.20 + "login" = NULL, 1.21 + "password" = NULL, 1.22 + "lang" = NULL, 1.23 + "notify_email" = NULL, 1.24 + "notify_email_unconfirmed" = NULL, 1.25 + "notify_email_secret" = NULL, 1.26 + "notify_email_secret_expiry" = NULL, 1.27 + "notify_email_lock_expiry" = NULL, 1.28 + "notify_level" = NULL, 1.29 + "password_reset_secret" = NULL, 1.30 + "password_reset_secret_expiry" = NULL, 1.31 + "organizational_unit" = NULL, 1.32 + "internal_posts" = NULL, 1.33 + "realname" = NULL, 1.34 + "birthday" = NULL, 1.35 + "address" = NULL, 1.36 + "email" = NULL, 1.37 + "xmpp_address" = NULL, 1.38 + "website" = NULL, 1.39 + "phone" = NULL, 1.40 + "mobile_phone" = NULL, 1.41 + "profession" = NULL, 1.42 + "external_memberships" = NULL, 1.43 + "external_posts" = NULL, 1.44 + "formatting_engine" = NULL, 1.45 + "statement" = NULL; 1.46 + -- "text_search_data" is updated by triggers 1.47 + DELETE FROM "setting"; 1.48 + DELETE FROM "setting_map"; 1.49 + DELETE FROM "member_relation_setting"; 1.50 + DELETE FROM "member_image"; 1.51 + DELETE FROM "contact"; 1.52 + DELETE FROM "ignored_member"; 1.53 + DELETE FROM "session"; 1.54 + DELETE FROM "area_setting"; 1.55 + DELETE FROM "issue_setting"; 1.56 + DELETE FROM "ignored_initiative"; 1.57 + DELETE FROM "initiative_setting"; 1.58 + DELETE FROM "suggestion_setting"; 1.59 + DELETE FROM "non_voter"; 1.60 + DELETE FROM "direct_voter" USING "issue" 1.61 + WHERE "direct_voter"."issue_id" = "issue"."id" 1.62 + AND "issue"."closed" ISNULL; 1.63 + RETURN; 1.64 + END; 1.65 + $$; 1.66 + 1.67 +COMMIT;