liquid_feedback_core
view update/prepare-beta25-beta26.sql @ 79:0758a2e02620
implement auto_support and delegation checks
* users can put their support in auto_support mode that supports every new draft text, this is automaticly done for the author of the draft.
* enforce that new delegations cannot be done set on inactive members.
* delete also incomming delegations on delete of a user.
* users can put their support in auto_support mode that supports every new draft text, this is automaticly done for the author of the draft.
* enforce that new delegations cannot be done set on inactive members.
* delete also incomming delegations on delete of a user.
author | Daniel Poelzleithner <poelzi@poelzi.org> |
---|---|
date | Thu Oct 07 19:45:12 2010 +0200 (2010-10-07) |
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