liquid_feedback_core
changeset 400:782eb17c7ad9
Remove referential integrity from "issue_order" table to avoid performance/locking issues
author | jbe |
---|---|
date | Sat Oct 12 15:33:35 2013 +0200 (2013-10-12) |
parents | db863178d98b |
children | ee922d286992 |
files | core.sql update/core-update.v2.2.5-v2.2.6.sql |
line diff
1.1 --- a/core.sql Fri Oct 11 20:50:16 2013 +0200 1.2 +++ b/core.sql Sat Oct 12 15:33:35 2013 +0200 1.3 @@ -607,12 +607,13 @@ 1.4 1.5 1.6 CREATE TABLE "issue_order" ( 1.7 - "id" INT8 PRIMARY KEY REFERENCES "issue" ("id") ON DELETE CASCADE ON UPDATE CASCADE, 1.8 + "id" INT8 PRIMARY KEY, --REFERENCES "issue" ("id") ON DELETE CASCADE ON UPDATE CASCADE, 1.9 "order_in_admission_state" INT4, 1.10 "order_in_open_states" INT4 ); 1.11 1.12 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.13 1.14 +COMMENT ON COLUMN "issue_order"."id" IS 'References "issue" ("id") but has no referential integrity trigger associated, due to performance/locking issues'; 1.15 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.16 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.17
2.1 --- a/update/core-update.v2.2.5-v2.2.6.sql Fri Oct 11 20:50:16 2013 +0200 2.2 +++ b/update/core-update.v2.2.5-v2.2.6.sql Sat Oct 12 15:33:35 2013 +0200 2.3 @@ -5,12 +5,13 @@ 2.4 AS "subquery"("string", "major", "minor", "revision"); 2.5 2.6 CREATE TABLE "issue_order" ( 2.7 - "id" INT8 PRIMARY KEY REFERENCES "issue" ("id") ON DELETE CASCADE ON UPDATE CASCADE, 2.8 + "id" INT8 PRIMARY KEY, --REFERENCES "issue" ("id") ON DELETE CASCADE ON UPDATE CASCADE, 2.9 "order_in_admission_state" INT4, 2.10 "order_in_open_states" INT4 ); 2.11 2.12 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.13 2.14 +COMMENT ON COLUMN "issue_order"."id" IS 'References "issue" ("id") but has no referential integrity trigger associated, due to performance/locking issues'; 2.15 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.16 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.17