From 8360ca04ad1f0c7d62ebb583aff91526462ce47a Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Thu, 21 May 2026 23:25:39 +0000 Subject: [PATCH] Prevent updates to ROLES.Role --- db/schemas/lib/triggers/create/roles.m4 | 4 ++++ doc/src/tables/roles.m4 | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/db/schemas/lib/triggers/create/roles.m4 b/db/schemas/lib/triggers/create/roles.m4 index ea4f3d4..c2a3782 100644 --- a/db/schemas/lib/triggers/create/roles.m4 +++ b/db/schemas/lib/triggers/create/roles.m4 @@ -51,6 +51,10 @@ CREATE OR REPLACE FUNCTION roles_func () -- and a new one created. cannot_change(`ROLES', `EID') + -- Allowing the Role to change complicates checking that sdb_actor + -- and sdb_actee roles occur in pairs. And maybe other checks. + cannot_change(`ROLES', `Role') + -- Allowing the Participant to change means that this trigger must -- check ARRIVALS.Cycle against sex and birthdate. And maybe -- other checks. This is simpler. diff --git a/doc/src/tables/roles.m4 b/doc/src/tables/roles.m4 index 32bfea1..5dfe711 100644 --- a/doc/src/tables/roles.m4 +++ b/doc/src/tables/roles.m4 @@ -106,7 +106,7 @@ examined. Depending on the behavior, there may be additional information found in other tables related to the event. -|notnull| +|cannot_change| |notnull| .. _ROLES.Participant: -- 2.34.1