From fa3017b26d35ead81908ba326e7712015c974f71 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Thu, 21 May 2026 23:08:30 +0000 Subject: [PATCH] There can only be one individual related to a food event --- db/schemas/lib/triggers/create/roles.m4 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/db/schemas/lib/triggers/create/roles.m4 b/db/schemas/lib/triggers/create/roles.m4 index d366252..ea4f3d4 100644 --- a/db/schemas/lib/triggers/create/roles.m4 +++ b/db/schemas/lib/triggers/create/roles.m4 @@ -161,9 +161,10 @@ CREATE OR REPLACE FUNCTION roles_func () END; END IF; - -- There can be at most one related row on ROLES for arrival events + -- There can be at most one related row on ROLES for arrival and food events IF TG_OP = 'INSERT' - AND a_behavior = 'sdb_arrival' THEN + AND (a_behavior = 'sdb_arrival' + OR a_behavior = 'sdb_food') THEN DECLARE a_pid roles.pid%TYPE; a_role roles.role%TYPE; -- 2.34.1