liquid_feedback_core
view update/core-update.beta21-beta22.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 | 9970f73c1140 |
children |
line source
1 BEGIN;
2 CREATE OR REPLACE VIEW "liquid_feedback_version" AS
3 SELECT * FROM (VALUES ('beta22', NULL, NULL, NULL))
4 AS "subquery"("string", "major", "minor", "revision");
5 ALTER TABLE "issue" DROP CONSTRAINT "valid_state";
6 ALTER TABLE "issue" ADD CONSTRAINT "valid_state" CHECK (
7 ("accepted" ISNULL AND "half_frozen" ISNULL AND "fully_frozen" ISNULL AND "closed" ISNULL AND "ranks_available" = FALSE) OR
8 ("accepted" ISNULL AND "half_frozen" ISNULL AND "fully_frozen" ISNULL AND "closed" NOTNULL AND "ranks_available" = FALSE) OR
9 ("accepted" NOTNULL AND "half_frozen" ISNULL AND "fully_frozen" ISNULL AND "closed" ISNULL AND "ranks_available" = FALSE) OR
10 ("accepted" NOTNULL AND "half_frozen" ISNULL AND "fully_frozen" ISNULL AND "closed" NOTNULL AND "ranks_available" = FALSE) OR
11 ("accepted" NOTNULL AND "half_frozen" NOTNULL AND "fully_frozen" ISNULL AND "closed" ISNULL AND "ranks_available" = FALSE) OR
12 ("accepted" NOTNULL AND "half_frozen" NOTNULL AND "fully_frozen" ISNULL AND "closed" NOTNULL AND "ranks_available" = FALSE) OR
13 ("accepted" NOTNULL AND "half_frozen" NOTNULL AND "fully_frozen" NOTNULL AND "closed" ISNULL AND "ranks_available" = FALSE) OR
14 ("accepted" NOTNULL AND "half_frozen" NOTNULL AND "fully_frozen" NOTNULL AND "closed" NOTNULL AND "ranks_available" = FALSE) OR
15 ("accepted" NOTNULL AND "half_frozen" NOTNULL AND "fully_frozen" NOTNULL AND "closed" NOTNULL AND "ranks_available" = TRUE) );
16 COMMIT;