liquid_feedback_core

view update/prepare-beta25-beta26.sql @ 80:ca13b2614d10

better be safe :-)
author Daniel Poelzleithner <poelzi@poelzi.org>
date Fri Oct 08 01:57:10 2010 +0200 (2010-10-08)
parents 1779e2303c08
children
line source
1 BEGIN;
3 CREATE OR REPLACE VIEW "liquid_feedback_version" AS
4 SELECT * FROM (VALUES ('incomplete_update_from_beta25_to_beta26', NULL, NULL, NULL))
5 AS "subquery"("string", "major", "minor", "revision");
7 ALTER TABLE "member" ADD COLUMN "last_login" TIMESTAMPTZ;
8 ALTER TABLE "member_history" ADD COLUMN "active" BOOLEAN;
10 UPDATE "member_history" SET "active" = TRUE;
11 INSERT INTO "member_history" ("member_id", "login", "active", "name")
12 SELECT "id", "login", TRUE AS "active", "name"
13 FROM "member" WHERE "active" = FALSE;
15 COMMIT;
17 -- Complete the update as follows:
18 -- =========================================
19 -- pg_dump --disable-triggers --data-only DATABASE_NAME > tmp.sql
20 -- dropdb DATABASE_NAME
21 -- createdb DATABASE_NAME
22 -- psql -v ON_ERROR_STOP=1 -f core.sql DATABASE_NAME
23 -- psql -v ON_ERROR_STOP=1 -f tmp.sql DATABASE_NAME
24 -- rm tmp.sql

Impressum / About Us