liquid_feedback_core

diff update/core-update.v2.2.5-v2.2.6.sql @ 408:f7b4457cf1a6

core.sql: Removed "order_in_open_states"
author jbe
date Mon Oct 14 00:23:04 2013 +0200 (2013-10-14)
parents 782eb17c7ad9
children 5f24058af0b8
line diff
     1.1 --- a/update/core-update.v2.2.5-v2.2.6.sql	Mon Oct 14 00:20:52 2013 +0200
     1.2 +++ b/update/core-update.v2.2.5-v2.2.6.sql	Mon Oct 14 00:23:04 2013 +0200
     1.3 @@ -6,14 +6,12 @@
     1.4  
     1.5  CREATE TABLE "issue_order" (
     1.6          "id"                    INT8            PRIMARY KEY, --REFERENCES "issue" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
     1.7 -        "order_in_admission_state" INT4,
     1.8 -        "order_in_open_states"  INT4 );
     1.9 +        "order_in_admission_state" INT4 );
    1.10  
    1.11  COMMENT ON TABLE "issue_order" IS 'Ordering information for issues that are not stored in the "issue" table to avoid locking of multiple issues at once';
    1.12  
    1.13  COMMENT ON COLUMN "issue_order"."id"                       IS 'References "issue" ("id") but has no referential integrity trigger associated, due to performance/locking issues';
    1.14 -COMMENT ON COLUMN "issue_order"."order_in_admission_state" IS 'To be used for sorting issues within an area, when showing only issues in admission state; NULL values sort last; updated by "lf_update_issue_order"';
    1.15 -COMMENT ON COLUMN "issue_order"."order_in_open_states"     IS 'To be used for sorting issues within an area, when showing all open issues; NULL values sort last; updated by "lf_update_issue_order"';
    1.16 +COMMENT ON COLUMN "issue_order"."order_in_admission_state" IS 'To be used for sorting issues within an area, when showing issues in admission state; NULL values sort last; updated by "lf_update_issue_order"';
    1.17  
    1.18  CREATE VIEW "issue_supporter_in_admission_state" AS
    1.19    SELECT DISTINCT
    1.20 @@ -31,21 +29,4 @@
    1.21  
    1.22  COMMENT ON VIEW "issue_supporter_in_admission_state" IS 'Helper view for "lf_update_issue_order" to allow a (proportional) ordering of issues within an area';
    1.23  
    1.24 -CREATE VIEW "open_issues_ordered_with_minimum_position" AS
    1.25 -  SELECT
    1.26 -    "area_id",
    1.27 -    "id" AS "issue_id",
    1.28 -    "order_in_admission_state" * 2 - 1 AS "minimum_position"
    1.29 -  FROM "issue" NATURAL LEFT JOIN "issue_order"
    1.30 -  WHERE "closed" ISNULL
    1.31 -  ORDER BY
    1.32 -    coalesce(
    1.33 -      "fully_frozen" + "voting_time",
    1.34 -      "half_frozen" + "verification_time",
    1.35 -      "accepted" + "discussion_time",
    1.36 -      "created" + "admission_time"
    1.37 -    ) - now();
    1.38 -
    1.39 -COMMENT ON VIEW "open_issues_ordered_with_minimum_position" IS 'Helper view for "lf_update_issue_order" to allow a (mixed) ordering of issues within an area';
    1.40 -
    1.41  COMMIT;

Impressum / About Us