From 2b97879bbf793bcb9d8220f5cbf23d152d45a7bb Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Sat, 12 Apr 2025 18:34:02 +0000 Subject: [PATCH] BIOGRAPHY_LOG.AnimID does not have to reference BIOGRAPHY_DATA Fixes problem #22. --- db/schemas/sokwedb/tables/create/biography_log.m4 | 2 +- doc/src/tables/biography_log.m4 | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/db/schemas/sokwedb/tables/create/biography_log.m4 b/db/schemas/sokwedb/tables/create/biography_log.m4 index 782f388..868a635 100644 --- a/db/schemas/sokwedb/tables/create/biography_log.m4 +++ b/db/schemas/sokwedb/tables/create/biography_log.m4 @@ -30,7 +30,7 @@ CREATE TABLE biography_log ( CHECK ('sdb_first_biography_log_date'::DATE <= dateofupdate) CONSTRAINT "DateOfUpdate may not be after today's date" CHECK (dateofupdate <= CURRENT_DATE) - ,animid_column(`animid', `AnimID', `NOT NULL') + ,not_animid_column() ,description TEXT NOT NULL emptytext_check(`Description') ,rationale TEXT NOT NULL diff --git a/doc/src/tables/biography_log.m4 b/doc/src/tables/biography_log.m4 index d8c1cec..e6e733c 100644 --- a/doc/src/tables/biography_log.m4 +++ b/doc/src/tables/biography_log.m4 @@ -61,10 +61,15 @@ AnimID (Animal IDentifier) `````````````````````````` .. |BIOGRAPHY_LOG.AnimID_summary| replace:: - The |BIOGRAPHY_DATA|.\ |BIOGRAPHY_DATA.AnimID| which identifies the - chimpanzee who's information was updated. + Information identifying the chimpanzee or chimpanzees who's + information was updated. + Most often this will be a |BIOGRAPHY_DATA|.\ + |BIOGRAPHY_DATA.AnimID| value, but this is not required. -|BIOGRAPHY_LOG.AnimID_summary| |notnull| +|BIOGRAPHY_LOG.AnimID_summary| |emptytext| |trimmedofspaces| |notnull| + +The system will generate a warning when the AnimID value is not a +|BIOGRAPHY_DATA|.\ |BIOGRAPHY_DATA.AnimID| value. .. _BIOGRAPHY_LOG.Description: -- 2.34.1