liquid_feedback_core
view update/prepare-beta25-beta26.sql @ 69:c65002c1a509
Important bugfix, affecting correct counting of supporters/votes
Changed "trustee_id" to "truster_id" in following views:
- global_delegation
- area_delegation
- issue_delegation
Also updated comments for that views.
The new behaviour was expected by the following functions:
- membership_weight_with_skipping
- weight_of_added_delegations_for_population_snapshot
- weight_of_added_delegations_for_interest_snapshot
- weight_of_added_vote_delegations
The bug caused inactive members to falsely increase voting weight of trustees.
Changed "trustee_id" to "truster_id" in following views:
- global_delegation
- area_delegation
- issue_delegation
Also updated comments for that views.
The new behaviour was expected by the following functions:
- membership_weight_with_skipping
- weight_of_added_delegations_for_population_snapshot
- weight_of_added_delegations_for_interest_snapshot
- weight_of_added_vote_delegations
The bug caused inactive members to falsely increase voting weight of trustees.
author | jbe |
---|---|
date | Mon Aug 30 22:01:08 2010 +0200 (2010-08-30) |
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