liquid_feedback_core
view update/core-update.v2.0.7-v2.0.8.sql @ 326:d59d0c3e4a18
merge
| author | jbe | 
|---|---|
| date | Sun Feb 10 18:49:01 2013 +0100 (2013-02-10) | 
| parents | fefc15eb747b | 
| children | 
 line source
     1 BEGIN;
     3 CREATE OR REPLACE VIEW "liquid_feedback_version" AS
     4   SELECT * FROM (VALUES ('2.0.8', 2, 0, 8))
     5   AS "subquery"("string", "major", "minor", "revision");
     7 CREATE OR REPLACE FUNCTION "delete_private_data"()
     8   RETURNS VOID
     9   LANGUAGE 'plpgsql' VOLATILE AS $$
    10     BEGIN
    11       DELETE FROM "member" WHERE "activated" ISNULL;
    12       UPDATE "member" SET
    13         "invite_code"                  = NULL,
    14         "invite_code_expiry"           = NULL,
    15         "admin_comment"                = NULL,
    16         "last_login"                   = NULL,
    17         "login"                        = NULL,
    18         "password"                     = NULL,
    19         "lang"                         = NULL,
    20         "notify_email"                 = NULL,
    21         "notify_email_unconfirmed"     = NULL,
    22         "notify_email_secret"          = NULL,
    23         "notify_email_secret_expiry"   = NULL,
    24         "notify_email_lock_expiry"     = NULL,
    25         "notify_level"                 = NULL,
    26         "password_reset_secret"        = NULL,
    27         "password_reset_secret_expiry" = NULL,
    28         "organizational_unit"          = NULL,
    29         "internal_posts"               = NULL,
    30         "realname"                     = NULL,
    31         "birthday"                     = NULL,
    32         "address"                      = NULL,
    33         "email"                        = NULL,
    34         "xmpp_address"                 = NULL,
    35         "website"                      = NULL,
    36         "phone"                        = NULL,
    37         "mobile_phone"                 = NULL,
    38         "profession"                   = NULL,
    39         "external_memberships"         = NULL,
    40         "external_posts"               = NULL,
    41         "formatting_engine"            = NULL,
    42         "statement"                    = NULL;
    43       -- "text_search_data" is updated by triggers
    44       DELETE FROM "setting";
    45       DELETE FROM "setting_map";
    46       DELETE FROM "member_relation_setting";
    47       DELETE FROM "member_image";
    48       DELETE FROM "contact";
    49       DELETE FROM "ignored_member";
    50       DELETE FROM "session";
    51       DELETE FROM "area_setting";
    52       DELETE FROM "issue_setting";
    53       DELETE FROM "ignored_initiative";
    54       DELETE FROM "initiative_setting";
    55       DELETE FROM "suggestion_setting";
    56       DELETE FROM "non_voter";
    57       DELETE FROM "direct_voter" USING "issue"
    58         WHERE "direct_voter"."issue_id" = "issue"."id"
    59         AND "issue"."closed" ISNULL;
    60       RETURN;
    61     END;
    62   $$;
    64 COMMIT;
