liquid_feedback_core

changeset 408:f7b4457cf1a6

core.sql: Removed "order_in_open_states"
author jbe
date Mon Oct 14 00:23:04 2013 +0200 (2013-10-14)
parents 92cdb3af0b54
children 5f24058af0b8
files core.sql update/core-update.v2.2.5-v2.2.6.sql
line diff
     1.1 --- a/core.sql	Mon Oct 14 00:20:52 2013 +0200
     1.2 +++ b/core.sql	Mon Oct 14 00:23:04 2013 +0200
     1.3 @@ -608,14 +608,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  
    1.19  CREATE TABLE "issue_setting" (
    1.20 @@ -2090,24 +2088,6 @@
    1.21  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.22  
    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 -
    1.42  CREATE VIEW "initiative_suggestion_order_calculation" AS
    1.43    SELECT
    1.44      "initiative"."id" AS "initiative_id",
     2.1 --- a/update/core-update.v2.2.5-v2.2.6.sql	Mon Oct 14 00:20:52 2013 +0200
     2.2 +++ b/update/core-update.v2.2.5-v2.2.6.sql	Mon Oct 14 00:23:04 2013 +0200
     2.3 @@ -6,14 +6,12 @@
     2.4  
     2.5  CREATE TABLE "issue_order" (
     2.6          "id"                    INT8            PRIMARY KEY, --REFERENCES "issue" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
     2.7 -        "order_in_admission_state" INT4,
     2.8 -        "order_in_open_states"  INT4 );
     2.9 +        "order_in_admission_state" INT4 );
    2.10  
    2.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';
    2.12  
    2.13  COMMENT ON COLUMN "issue_order"."id"                       IS 'References "issue" ("id") but has no referential integrity trigger associated, due to performance/locking issues';
    2.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"';
    2.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"';
    2.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"';
    2.17  
    2.18  CREATE VIEW "issue_supporter_in_admission_state" AS
    2.19    SELECT DISTINCT
    2.20 @@ -31,21 +29,4 @@
    2.21  
    2.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';
    2.23  
    2.24 -CREATE VIEW "open_issues_ordered_with_minimum_position" AS
    2.25 -  SELECT
    2.26 -    "area_id",
    2.27 -    "id" AS "issue_id",
    2.28 -    "order_in_admission_state" * 2 - 1 AS "minimum_position"
    2.29 -  FROM "issue" NATURAL LEFT JOIN "issue_order"
    2.30 -  WHERE "closed" ISNULL
    2.31 -  ORDER BY
    2.32 -    coalesce(
    2.33 -      "fully_frozen" + "voting_time",
    2.34 -      "half_frozen" + "verification_time",
    2.35 -      "accepted" + "discussion_time",
    2.36 -      "created" + "admission_time"
    2.37 -    ) - now();
    2.38 -
    2.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';
    2.40 -
    2.41  COMMIT;

Impressum / About Us