liquid_feedback_core

annotate update/prepare-beta25-beta26.sql @ 94:fb9688f31740

Corrected "delete_member" and "delete_private_data" functions to refer to "ignored_issue" table instead of non-existing "ignored_voting" table; Delete "ignored_issue" entries in "clean_issue" function as well
author jbe
date Sun Oct 31 02:38:05 2010 +0200 (2010-10-31)
parents 1779e2303c08
children
rev   line source
jbe@42 1 BEGIN;
jbe@42 2
jbe@42 3 CREATE OR REPLACE VIEW "liquid_feedback_version" AS
jbe@43 4 SELECT * FROM (VALUES ('incomplete_update_from_beta25_to_beta26', NULL, NULL, NULL))
jbe@42 5 AS "subquery"("string", "major", "minor", "revision");
jbe@42 6
jbe@42 7 ALTER TABLE "member" ADD COLUMN "last_login" TIMESTAMPTZ;
jbe@42 8 ALTER TABLE "member_history" ADD COLUMN "active" BOOLEAN;
jbe@42 9
jbe@42 10 UPDATE "member_history" SET "active" = TRUE;
jbe@42 11 INSERT INTO "member_history" ("member_id", "login", "active", "name")
jbe@42 12 SELECT "id", "login", TRUE AS "active", "name"
jbe@42 13 FROM "member" WHERE "active" = FALSE;
jbe@42 14
jbe@42 15 COMMIT;
jbe@42 16
jbe@42 17 -- Complete the update as follows:
jbe@42 18 -- =========================================
jbe@42 19 -- pg_dump --disable-triggers --data-only DATABASE_NAME > tmp.sql
jbe@42 20 -- dropdb DATABASE_NAME
jbe@42 21 -- createdb DATABASE_NAME
jbe@42 22 -- psql -v ON_ERROR_STOP=1 -f core.sql DATABASE_NAME
jbe@42 23 -- psql -v ON_ERROR_STOP=1 -f tmp.sql DATABASE_NAME
jbe@42 24 -- rm tmp.sql
jbe@42 25

Impressum / About Us