liquid_feedback_core

changeset 618:5b3b20f1278d

Added missing referential integrity constraint on "posting" table
author jbe
date Fri Nov 27 15:45:31 2020 +0100 (3 months ago)
parents 8e9d0878b5dc
children 63092784fe9d
files core.sql update/core-update.v4.2.0-v4.2.1.sql
line diff
     1.1 --- a/core.sql	Mon Oct 05 16:18:17 2020 +0200
     1.2 +++ b/core.sql	Fri Nov 27 15:45:31 2020 +0100
     1.3 @@ -1386,6 +1386,7 @@
     1.4          FOREIGN KEY ("area_id", "issue_id") REFERENCES "issue" ("area_id", "id") ON DELETE CASCADE ON UPDATE CASCADE,
     1.5          FOREIGN KEY ("policy_id", "issue_id") REFERENCES "issue" ("policy_id", "id") ON DELETE CASCADE ON UPDATE CASCADE,
     1.6          "initiative_id"         INT4,
     1.7 +        FOREIGN KEY ("issue_id", "initiative_id") REFERENCES "initiative" ("issue_id", "id"),
     1.8          "suggestion_id"         INT8,
     1.9          -- NOTE: no referential integrity for suggestions because those are
    1.10          --       actually deleted
     2.1 --- a/update/core-update.v4.2.0-v4.2.1.sql	Mon Oct 05 16:18:17 2020 +0200
     2.2 +++ b/update/core-update.v4.2.0-v4.2.1.sql	Fri Nov 27 15:45:31 2020 +0100
     2.3 @@ -47,6 +47,8 @@
     2.4  COMMENT ON COLUMN "delegating_voter"."ownweight" IS 'Own voting weight of member, disregarding delegations';
     2.5  COMMENT ON COLUMN "delegating_voter"."weight"    IS 'Intermediate voting weight considering incoming delegations';
     2.6  
     2.7 +ALTER TABLE "posting" ADD FOREIGN KEY ("issue_id", "initiative_id") REFERENCES "initiative" ("issue_id", "id");
     2.8 +
     2.9  DROP VIEW "issue_delegation";
    2.10  CREATE VIEW "issue_delegation" AS
    2.11    SELECT DISTINCT ON ("issue"."id", "delegation"."truster_id")

Impressum / About Us