text: BEGIN;
  
  CREATE OR REPLACE VIEW "liquid_feedback_version" AS
    SELECT * FROM (VALUES ('2.0.8', 2, 0, 8))
    AS "subquery"("string", "major", "minor", "revision");
  
  CREATE OR REPLACE FUNCTION "delete_private_data"()
    RETURNS VOID
    LANGUAGE 'plpgsql' VOLATILE AS $$
      BEGIN
        DELETE FROM "member" WHERE "activated" ISNULL;
        UPDATE "member" SET
          "invite_code"                  = NULL,
          "invite_code_expiry"           = NULL,
          "admin_comment"                = NULL,
          "last_login"                   = NULL,
          "login"                        = NULL,
          "password"                     = NULL,
          "lang"                         = NULL,
          "notify_email"                 = NULL,
          "notify_email_unconfirmed"     = NULL,
          "notify_email_secret"          = NULL,
          "notify_email_secret_expiry"   = NULL,
          "notify_email_lock_expiry"     = NULL,
          "notify_level"                 = NULL,
          "password_reset_secret"        = NULL,
          "password_reset_secret_expiry" = NULL,
          "organizational_unit"          = NULL,
          "internal_posts"               = NULL,
          "realname"                     = NULL,
          "birthday"                     = NULL,
          "address"                      = NULL,
          "email"                        = NULL,
          "xmpp_address"                 = NULL,
          "website"                      = NULL,
          "phone"                        = NULL,
          "mobile_phone"                 = NULL,
          "profession"                   = NULL,
          "external_memberships"         = NULL,
          "external_posts"               = NULL,
          "formatting_engine"            = NULL,
          "statement"                    = NULL;
        -- "text_search_data" is updated by triggers
        DELETE FROM "setting";
        DELETE FROM "setting_map";
        DELETE FROM "member_relation_setting";
        DELETE FROM "member_image";
        DELETE FROM "contact";
        DELETE FROM "ignored_member";
        DELETE FROM "session";
        DELETE FROM "area_setting";
        DELETE FROM "issue_setting";
        DELETE FROM "ignored_initiative";
        DELETE FROM "initiative_setting";
        DELETE FROM "suggestion_setting";
        DELETE FROM "non_voter";
        DELETE FROM "direct_voter" USING "issue"
          WHERE "direct_voter"."issue_id" = "issue"."id"
          AND "issue"."closed" ISNULL;
        RETURN;
      END;
    $$;
  
  COMMIT;
  