# HG changeset patch # User bsw # Date 1506370086 -7200 # Node ID dc48b79b8a7edff0a3b49ff9e4a04633eac10746 # Parent fc09088587b27e26b64ec1165394396345c522f6 Bug fix in constr_for_delegation on event table diff -r fc09088587b2 -r dc48b79b8a7e core.sql --- a/core.sql Mon Sep 25 14:44:35 2017 +0200 +++ b/core.sql Mon Sep 25 22:08:06 2017 +0200 @@ -1636,7 +1636,7 @@ CONSTRAINT "constr_for_delegation" CHECK ( "event" != 'delegation' OR ( "member_id" NOTNULL AND - ("other_member_id" NOTNULL) OR ("boolean_value" = FALSE) AND + (("other_member_id" ISNULL) OR ("boolean_value" = TRUE)) AND "scope" NOTNULL AND "unit_id" NOTNULL AND ("area_id" NOTNULL) = ("scope" != 'unit'::"delegation_scope") AND diff -r fc09088587b2 -r dc48b79b8a7e update/core-update.v3.2.2-v4.0.0.sql --- a/update/core-update.v3.2.2-v4.0.0.sql Mon Sep 25 14:44:35 2017 +0200 +++ b/update/core-update.v3.2.2-v4.0.0.sql Mon Sep 25 22:08:06 2017 +0200 @@ -981,7 +981,7 @@ ALTER TABLE "event" ADD CONSTRAINT "constr_for_delegation" CHECK ( "event" != 'delegation' OR ( "member_id" NOTNULL AND - ("other_member_id" NOTNULL) OR ("boolean_value" = FALSE) AND + (("other_member_id" ISNULL) OR ("boolean_value" = TRUE)) AND "scope" NOTNULL AND "unit_id" NOTNULL AND ("area_id" NOTNULL) = ("scope" != 'unit'::"delegation_scope") AND