liquid_feedback_core

view update/core-update.v2.0.4-v2.0.5.sql @ 341:607e8f5d66eb

Write "NOW()" as "now()"
author jbe
date Thu Feb 21 16:40:17 2013 +0100 (2013-02-21)
parents 6e273a6ed235
children
line source
1 BEGIN;
3 CREATE OR REPLACE VIEW "liquid_feedback_version" AS
4 SELECT * FROM (VALUES ('2.0.5', 2, 0, 5))
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 "admin_comment" = NULL,
15 "last_login" = NULL,
16 "login" = NULL,
17 "password" = NULL,
18 "notify_email" = NULL,
19 "notify_email_unconfirmed" = NULL,
20 "notify_email_secret" = NULL,
21 "notify_email_secret_expiry" = NULL,
22 "notify_email_lock_expiry" = NULL,
23 "password_reset_secret" = NULL,
24 "password_reset_secret_expiry" = NULL,
25 "organizational_unit" = NULL,
26 "internal_posts" = NULL,
27 "realname" = NULL,
28 "birthday" = NULL,
29 "address" = NULL,
30 "email" = NULL,
31 "xmpp_address" = NULL,
32 "website" = NULL,
33 "phone" = NULL,
34 "mobile_phone" = NULL,
35 "profession" = NULL,
36 "external_memberships" = NULL,
37 "external_posts" = NULL,
38 "statement" = NULL;
39 -- "text_search_data" is updated by triggers
40 DELETE FROM "setting";
41 DELETE FROM "setting_map";
42 DELETE FROM "member_relation_setting";
43 DELETE FROM "member_image";
44 DELETE FROM "contact";
45 DELETE FROM "ignored_member";
46 DELETE FROM "area_setting";
47 DELETE FROM "issue_setting";
48 DELETE FROM "ignored_initiative";
49 DELETE FROM "initiative_setting";
50 DELETE FROM "suggestion_setting";
51 DELETE FROM "non_voter";
52 DELETE FROM "direct_voter" USING "issue"
53 WHERE "direct_voter"."issue_id" = "issue"."id"
54 AND "issue"."closed" ISNULL;
55 RETURN;
56 END;
57 $$;
59 COMMIT;

Impressum / About Us