From ef6cd8c3468defd50cad7e66b37a59560149376a Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Wed, 1 Oct 2025 21:15:19 +0000 Subject: [PATCH] The FOLLOWS.FID cannot change --- db/schemas/lib/triggers/create/follows.m4 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/db/schemas/lib/triggers/create/follows.m4 b/db/schemas/lib/triggers/create/follows.m4 index c0777e6..1c476a0 100644 --- a/db/schemas/lib/triggers/create/follows.m4 +++ b/db/schemas/lib/triggers/create/follows.m4 @@ -30,11 +30,16 @@ CREATE OR REPLACE FUNCTION follows_func () sdb_function_set_search_path AS $$ BEGIN - -- Function for biography_data insert and update triggers + -- Function for follows insert and update triggers -- -- AGPL_notice(` --', `2025', `The Meme Factory, Inc., www.karlpinc.com') + IF TG_OP = 'UPDATE' THEN + -- Allowing the FID to change makes life too complicated. + cannot_change(`FOLLOWS', `FID') + END IF; + -- Cannot have a follow date before the individual was studied DECLARE this_entrydate biography_data.entrydate%TYPE; -- 2.34.1