liquid_feedback_core
view update/core-update.v1.2.7-v1.2.8.sql @ 128:5ea2f9c5ba9a
Set "rank" for all "admitted" initiatives after voting is finished; Additional columns in "initiative" table store voting result information
Changes in detail:
- Renamed column "majority" of table "initiative" to "attainable"
- Added columns "favored", "unfavored" and "eligible" to "initiative" table
- Added constraints to "initiative" table, restricting certain value combinations in the the new columns
- Modified "calculate_ranks" function to update the new columns and always write "rank" information
- Marking the final winner is now done utilizing the new "eligible" column
Changes in detail:
- Renamed column "majority" of table "initiative" to "attainable"
- Added columns "favored", "unfavored" and "eligible" to "initiative" table
- Added constraints to "initiative" table, restricting certain value combinations in the the new columns
- Modified "calculate_ranks" function to update the new columns and always write "rank" information
- Marking the final winner is now done utilizing the new "eligible" column
author | jbe |
---|---|
date | Tue May 24 14:58:42 2011 +0200 (2011-05-24) |
parents | f77c0f3d443c |
children |
line source
1 BEGIN;
3 CREATE OR REPLACE VIEW "liquid_feedback_version" AS
4 SELECT * FROM (VALUES ('1.2.8', 1, 2, 8))
5 AS "subquery"("string", "major", "minor", "revision");
7 ALTER TABLE "delegation" DROP CONSTRAINT "delegation_area_id_key";
8 ALTER TABLE "delegation" DROP CONSTRAINT "delegation_issue_id_key";
9 DROP INDEX "delegation_global_truster_id_trustee_id_unique_idx";
11 ALTER TABLE "delegation" ADD UNIQUE ("area_id", "truster_id");
12 ALTER TABLE "delegation" ADD UNIQUE ("issue_id", "truster_id");
13 CREATE UNIQUE INDEX "delegation_global_truster_id_unique_idx"
14 ON "delegation" ("truster_id") WHERE "scope" = 'global';
16 COMMIT;