liquid_feedback_core

changeset 238:fefc15eb747b v2.0.8

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 ce62f8451659
children fc5d731ce23a
files core.sql update/core-update.v2.0.7-v2.0.8.sql
line diff
     1.1 --- a/core.sql	Tue Mar 13 20:25:07 2012 +0100
     1.2 +++ b/core.sql	Thu Mar 15 15:18:09 2012 +0100
     1.3 @@ -7,7 +7,7 @@
     1.4  BEGIN;
     1.5  
     1.6  CREATE VIEW "liquid_feedback_version" AS
     1.7 -  SELECT * FROM (VALUES ('2.0.5', 2, 0, 5))
     1.8 +  SELECT * FROM (VALUES ('2.0.8', 2, 0, 8))
     1.9    AS "subquery"("string", "major", "minor", "revision");
    1.10  
    1.11  
    1.12 @@ -4188,11 +4188,13 @@
    1.13          "last_login"                   = NULL,
    1.14          "login"                        = NULL,
    1.15          "password"                     = NULL,
    1.16 +        "lang"                         = NULL,
    1.17          "notify_email"                 = NULL,
    1.18          "notify_email_unconfirmed"     = NULL,
    1.19          "notify_email_secret"          = NULL,
    1.20          "notify_email_secret_expiry"   = NULL,
    1.21          "notify_email_lock_expiry"     = NULL,
    1.22 +        "notify_level"                 = NULL,
    1.23          "password_reset_secret"        = NULL,
    1.24          "password_reset_secret_expiry" = NULL,
    1.25          "organizational_unit"          = NULL,
    1.26 @@ -4208,6 +4210,7 @@
    1.27          "profession"                   = NULL,
    1.28          "external_memberships"         = NULL,
    1.29          "external_posts"               = NULL,
    1.30 +        "formatting_engine"            = NULL,
    1.31          "statement"                    = NULL;
    1.32        -- "text_search_data" is updated by triggers
    1.33        DELETE FROM "setting";
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/update/core-update.v2.0.7-v2.0.8.sql	Thu Mar 15 15:18:09 2012 +0100
     2.3 @@ -0,0 +1,64 @@
     2.4 +BEGIN;
     2.5 +
     2.6 +CREATE OR REPLACE VIEW "liquid_feedback_version" AS
     2.7 +  SELECT * FROM (VALUES ('2.0.8', 2, 0, 8))
     2.8 +  AS "subquery"("string", "major", "minor", "revision");
     2.9 +
    2.10 +CREATE OR REPLACE FUNCTION "delete_private_data"()
    2.11 +  RETURNS VOID
    2.12 +  LANGUAGE 'plpgsql' VOLATILE AS $$
    2.13 +    BEGIN
    2.14 +      DELETE FROM "member" WHERE "activated" ISNULL;
    2.15 +      UPDATE "member" SET
    2.16 +        "invite_code"                  = NULL,
    2.17 +        "invite_code_expiry"           = NULL,
    2.18 +        "admin_comment"                = NULL,
    2.19 +        "last_login"                   = NULL,
    2.20 +        "login"                        = NULL,
    2.21 +        "password"                     = NULL,
    2.22 +        "lang"                         = NULL,
    2.23 +        "notify_email"                 = NULL,
    2.24 +        "notify_email_unconfirmed"     = NULL,
    2.25 +        "notify_email_secret"          = NULL,
    2.26 +        "notify_email_secret_expiry"   = NULL,
    2.27 +        "notify_email_lock_expiry"     = NULL,
    2.28 +        "notify_level"                 = NULL,
    2.29 +        "password_reset_secret"        = NULL,
    2.30 +        "password_reset_secret_expiry" = NULL,
    2.31 +        "organizational_unit"          = NULL,
    2.32 +        "internal_posts"               = NULL,
    2.33 +        "realname"                     = NULL,
    2.34 +        "birthday"                     = NULL,
    2.35 +        "address"                      = NULL,
    2.36 +        "email"                        = NULL,
    2.37 +        "xmpp_address"                 = NULL,
    2.38 +        "website"                      = NULL,
    2.39 +        "phone"                        = NULL,
    2.40 +        "mobile_phone"                 = NULL,
    2.41 +        "profession"                   = NULL,
    2.42 +        "external_memberships"         = NULL,
    2.43 +        "external_posts"               = NULL,
    2.44 +        "formatting_engine"            = NULL,
    2.45 +        "statement"                    = NULL;
    2.46 +      -- "text_search_data" is updated by triggers
    2.47 +      DELETE FROM "setting";
    2.48 +      DELETE FROM "setting_map";
    2.49 +      DELETE FROM "member_relation_setting";
    2.50 +      DELETE FROM "member_image";
    2.51 +      DELETE FROM "contact";
    2.52 +      DELETE FROM "ignored_member";
    2.53 +      DELETE FROM "session";
    2.54 +      DELETE FROM "area_setting";
    2.55 +      DELETE FROM "issue_setting";
    2.56 +      DELETE FROM "ignored_initiative";
    2.57 +      DELETE FROM "initiative_setting";
    2.58 +      DELETE FROM "suggestion_setting";
    2.59 +      DELETE FROM "non_voter";
    2.60 +      DELETE FROM "direct_voter" USING "issue"
    2.61 +        WHERE "direct_voter"."issue_id" = "issue"."id"
    2.62 +        AND "issue"."closed" ISNULL;
    2.63 +      RETURN;
    2.64 +    END;
    2.65 +  $$;
    2.66 +
    2.67 +COMMIT;

Impressum / About Us