From 0f636726530da86acdcd01e4fc3ec73bbc403bb0 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc" Date: Mon, 29 Jan 2024 16:27:53 -0600 Subject: [PATCH] Change BIOGRAPHY table name to BIOGRAPHY_DATA --- db/include/tablemacros.m4 | 6 +- db/schemas/lib/triggers/Makefile | 4 +- .../{biography.m4 => biography_data.m4} | 160 +++++++-------- db/schemas/lib/triggers/create/comm_membs.m4 | 24 +-- .../drop/{biography.m4 => biography_data.m4} | 8 +- db/schemas/sokwedb/indexes/Makefile | 2 +- .../{biography.m4 => biography_data.m4} | 24 +-- .../drop/{biography.m4 => biography_data.m4} | 16 +- db/schemas/sokwedb/tables/Makefile | 2 +- .../{biography.m4 => biography_data.m4} | 6 +- doc/src/architecture/special_values.m4 | 4 +- doc/src/epilog.inc.m4 | 62 ++++-- doc/src/tables.m4 | 2 +- .../{biography.m4 => biography_data.m4} | 184 +++++++++--------- doc/src/tables/biography_log.m4 | 6 +- doc/src/tables/comm_memb_log.m4 | 2 +- doc/src/tables/comm_membs.m4 | 8 +- 17 files changed, 273 insertions(+), 247 deletions(-) rename db/schemas/lib/triggers/create/{biography.m4 => biography_data.m4} (74%) rename db/schemas/lib/triggers/drop/{biography.m4 => biography_data.m4} (76%) rename db/schemas/sokwedb/indexes/create/{biography.m4 => biography_data.m4} (54%) rename db/schemas/sokwedb/indexes/drop/{biography.m4 => biography_data.m4} (68%) rename db/schemas/sokwedb/tables/create/{biography.m4 => biography_data.m4} (96%) rename doc/src/tables/{biography.m4 => biography_data.m4} (52%) diff --git a/db/include/tablemacros.m4 b/db/include/tablemacros.m4 index 9c46850..ddbe364 100644 --- a/db/include/tablemacros.m4 +++ b/db/include/tablemacros.m4 @@ -1,4 +1,4 @@ -dnl Copyright (C) 2012, 2014, 2023 The Meme Factory, Inc. +dnl Copyright (C) 2012, 2014, 2023, 2024 The Meme Factory, Inc. dnl http://www.karlpinc.com/ dnl Copyright (C) 2007, 2008, 2010, 2011, Karl O. Pinc dnl @@ -107,8 +107,8 @@ dnl null Either `NULL' or `NOT NULL'. dnl define(`animid_type_column', ` $1 TEXT $3 - CONSTRAINT "$2 must be a BIOGRAPHY.AnimID value" - REFERENCES biography(animid)')dnl + CONSTRAINT "$2 must be a BIOGRAPHY_DATA.AnimID value" + REFERENCES biography_data(animid)')dnl -- -- Constraints diff --git a/db/schemas/lib/triggers/Makefile b/db/schemas/lib/triggers/Makefile index dfa0a0f..83c4e77 100644 --- a/db/schemas/lib/triggers/Makefile +++ b/db/schemas/lib/triggers/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 2023 The Meme Factory, Inc. http://www.karlpinc.com/ +# Copyright (C) 2023, 2024 The Meme Factory, Inc. http://www.karlpinc.com/ # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -21,7 +21,7 @@ # This is not particuarly significant but must contain every trigger file. ORDER := comm_ids \ departtypes \ - biography \ + biography_data \ comm_membs ## diff --git a/db/schemas/lib/triggers/create/biography.m4 b/db/schemas/lib/triggers/create/biography_data.m4 similarity index 74% rename from db/schemas/lib/triggers/create/biography.m4 rename to db/schemas/lib/triggers/create/biography_data.m4 index 9b6f221..e4754d9 100644 --- a/db/schemas/lib/triggers/create/biography.m4 +++ b/db/schemas/lib/triggers/create/biography_data.m4 @@ -13,7 +13,7 @@ dnl dnl You should have received a copy of the GNU Affero General Public License dnl along with this program. If not, see . dnl -dnl Triggers for the biography table +dnl Triggers for the biography_data table dnl dnl Karl O. Pinc @@ -31,7 +31,8 @@ dnl parent_col The column to check, either 'momid' or 'dadid' dnl description Description of the relationship, either 'mother' or 'father' dnl sex_code The code for the parent's sex, either sdb_female or sdb_male dnl -dnl Restrictions: Must be used in a FOR EACH ROW insert or update dnl trigger function. +dnl Restrictions: +dnl Must be used in a FOR EACH ROW insert or update dnl trigger function. changequote({,}) define({check_sex}, {dnl IF NEW.$1 IS NOT NULL @@ -39,13 +40,13 @@ define({check_sex}, {dnl AND NEW.$1 IS DISTINCT FROM OLD.$1) OR TG_OP = 'INSERT') THEN DECLARE - parent_sex biography.sex%TYPE; + parent_sex biography_data.sex%TYPE; BEGIN - SELECT biography.sex + SELECT biography_data.sex INTO parent_sex - FROM biography - WHERE biography.animid = NEW.$1 - AND biography.sex <> '$3'; + FROM biography_data + WHERE biography_data.animid = NEW.$1 + AND biography_data.sex <> '$3'; IF FOUND THEN RAISE EXCEPTION integrity_constraint_violation USING MESSAGE = 'The $2''s sex must be $3' @@ -62,7 +63,7 @@ define({check_sex}, {dnl }) changequote(`,') -dnl Plpgsql fragment that checks for invalid BIOGRAPHY.FirstBorn +dnl Plpgsql fragment that checks for invalid BIOGRAPHY_DATA.FirstBorn dnl values. dnl dnl Syntax: check_firstborn(new_or_old, msg_prefix) @@ -80,42 +81,45 @@ define({check_firstborn}, {dnl IF $1.momid IS NOT NULL THEN DECLARE -- Info on the first born - fb_animid biography.animid%TYPE; - fb_animname biography.animname%TYPE; - fb_birthdate biography.birthdate%TYPE; + fb_animid biography_data.animid%TYPE; + fb_animname biography_data.animname%TYPE; + fb_birthdate biography_data.birthdate%TYPE; -- Info on a sibling who breaks the rules - bad_animid biography.animid%TYPE; - bad_animname biography.animname%TYPE; - bad_birthdate biography.birthdate%TYPE; - bad_firstborn biography.firstborn%TYPE; + bad_animid biography_data.animid%TYPE; + bad_animname biography_data.animname%TYPE; + bad_birthdate biography_data.birthdate%TYPE; + bad_firstborn biography_data.firstborn%TYPE; BEGIN -- Find the mother's firstborn - SELECT biography.animid, biography.animname, biography.birthdate - INTO fb_animid, fb_animname, fb_birthdate - FROM biography - WHERE biography.momid = $1.momid - ORDER BY biography.birthdate + SELECT biography_data.animid, biography_data.animname + , biography_data.birthdate + INTO fb_animid, fb_animname + , fb_birthdate + FROM biography_data + WHERE biography_data.momid = $1.momid + ORDER BY biography_data.birthdate LIMIT 1; -- Find a random sibling with a bad FirstBorn -- This could be the row that's being inserted or updated; -- we don't bother with a separate test/error message. -- (Collect data to produce a wordy error message instead of using -- a sub-select.) - SELECT biography.animid, biography.animname, biography.birthdate - , biography.firstborn - INTO bad_animid, bad_animname, bad_birthdate - , bad_firstborn - FROM biography - WHERE biography.momid = $1.momid - AND biography.birthdate > fb_birthdate - AND biography.firstborn <> 'sdb_not_firstborn' - ORDER BY biography.birthdate + SELECT biography_data.animid, biography_data.animname + , biography_data.birthdate, biography_data.firstborn + INTO bad_animid, bad_animname + , bad_birthdate, bad_firstborn + FROM biography_data + WHERE biography_data.momid = $1.momid + AND biography_data.birthdate > fb_birthdate + AND biography_data.firstborn <> 'sdb_not_firstborn' + ORDER BY biography_data.birthdate LIMIT 1; IF FOUND THEN RAISE EXCEPTION integrity_constraint_violation USING MESSAGE = 'All but the youngest sibling (or siblings' || ' in the case of twins) must have a' - || ' (BIOGRAPHY.FirstBorn) = (sdb_not_firstborn)' + || ' (BIOGRAPHY_DATA.FirstBorn) =' + || ' (sdb_not_firstborn)' , DETAIL = '$2 (AnimID) = (' || $1.animid || '), (AnimName) = (' @@ -155,26 +159,26 @@ define({check_firstborn}, {dnl changequote(`,') -RAISE INFO 'biography_func'; -CREATE OR REPLACE FUNCTION biography_func () +RAISE INFO 'biography_data_func'; +CREATE OR REPLACE FUNCTION biography_data_func () RETURNS trigger LANGUAGE plpgsql sdb_function_set_search_path AS $$ BEGIN - -- Function for biography insert and update triggers + -- Function for biography_data insert and update triggers -- -- AGPL_notice(` --', `2023, 2024', `The Meme Factory, Inc., www.karlpinc.com') IF TG_OP = 'UPDATE' THEN -- Allowing the AnimID to change makes life too complicated. - cannot_change(`BIOGRAPHY', `AnimID') + cannot_change(`BIOGRAPHY_DATA', `AnimID') END IF; -- Can't change the unknown individual IF TG_OP = 'UPDATE' THEN - restrict_special_row(`BIOGRAPHY', `AnimID', `sdb_unk') + restrict_special_row(`BIOGRAPHY_DATA', `AnimID', `sdb_unk') END IF; -- A mother must be female @@ -193,30 +197,32 @@ CREATE OR REPLACE FUNCTION biography_func () OR OLD.bdmin <> NEW.bdmin OR OLD.bdmax <> NEW.bdmax)) THEN DECLARE - other_animid biography.animid%TYPE; - other_animname biography.animname%TYPE; - other_bdmin biography.bdmin%TYPE; - other_bdmax biography.bdmax%TYPE; - other_sex biography.sex%TYPE; + other_animid biography_data.animid%TYPE; + other_animname biography_data.animname%TYPE; + other_bdmin biography_data.bdmin%TYPE; + other_bdmax biography_data.bdmax%TYPE; + other_sex biography_data.sex%TYPE; BEGIN IF TG_OP = 'UPDATE' THEN -- See if one of this individual's children was born too late -- (Inserts can't have existing children) - SELECT biography.animid, biography.animname, biography.bdmax - INTO other_animid, other_animname, other_bdmax - FROM biography + SELECT biography_data.animid, biography_data.animname + , biography_data.bdmax + INTO other_animid, other_animname + , other_bdmax + FROM biography_data WHERE (NEW.sex = 'sdb_female' - AND biography.momid = NEW.animid - AND biography.bdmax + AND biography_data.momid = NEW.animid + AND biography_data.bdmax > NEW.bdmin - 'sdb_min_f_birth sdb_min_f_birth_units'::interval) OR (NEW.sex = 'sdb_male' - AND biography.dadid = NEW.animid - AND biography.bdmax + AND biography_data.dadid = NEW.animid + AND biography_data.bdmax > NEW.bdbin - 'sdb_min_m_birth sdb_min_m_birth_units' ::interval) - ORDER BY biography.birthdate DESC + ORDER BY biography_data.birthdate DESC LIMIT 1; IF FOUND THEN RAISE EXCEPTION integrity_constraint_violation USING @@ -244,22 +250,22 @@ CREATE OR REPLACE FUNCTION biography_func () END IF; -- See if one of this individual's parents were born too soon. - SELECT biography.animid, biography.animname, biography.bdmin - , biography.sex - INTO other_animid, other_animname, other_bdmin - , other_sex - FROM biography - WHERE (biography.sex = 'sdb_female' - AND biography.animid = NEW.momid + SELECT biography_data.animid, biography_data.animname + , biography_data.bdmin, biography_data.sex + INTO other_animid, other_animname + , other_bdmin, other_sex + FROM biography_data + WHERE (biography_data.sex = 'sdb_female' + AND biography_data.animid = NEW.momid AND NEW.bdmax - < biography.bdmin + < biography_data.bdmin + 'sdb_min_f_birth sdb_min_f_birth_units'::interval) - OR (biography.sex = 'sdb_male' - AND biography.animid = NEW.dadid + OR (biography_data.sex = 'sdb_male' + AND biography_data.animid = NEW.dadid AND NEW.bdmax - < biography.bdmin + < biography_data.bdmin + 'sdb_min_m_birth sdb_min_m_birth_units'::interval) - ORDER BY biography.sex + ORDER BY biography_data.sex LIMIT 1; IF FOUND THEN RAISE EXCEPTION integrity_constraint_violation USING @@ -295,19 +301,19 @@ CREATE OR REPLACE FUNCTION biography_func () IF NEW.momid IS DISTINCT FROM OLD.momid THEN -- Check offspring of both new and old mothers check_firstborn(`NEW', - `Updating the BIOGRAPHY row where the new values are') + `Updating the BIOGRAPHY_DATA row where the new values are') check_firstborn(`OLD', - `Updating the BIOGRAPHY row where the old values are') + `Updating the BIOGRAPHY_DATA row where the old values are') ELSE IF NEW.birthdate <> OLD.birthdate THEN -- Check siblings check_firstborn(`NEW', - `Updating the BIOGRAPHY row where the new values are') + `Updating the BIOGRAPHY_DATA row where the new values are') END IF; END IF; ELSE -- TG_OP = 'INSERT', check siblings - check_firstborn(`NEW', `Inserting a BIOGRAPHY row where') + check_firstborn(`NEW', `Inserting a BIOGRAPHY_DATA row where') END IF; -- An individual may not be placed in a community before the @@ -377,38 +383,38 @@ CREATE OR REPLACE FUNCTION biography_func () $$; -RAISE INFO 'biography_delete_func'; -CREATE OR REPLACE FUNCTION biography_delete_func () +RAISE INFO 'biography_data_delete_func'; +CREATE OR REPLACE FUNCTION biography_data_delete_func () RETURNS trigger LANGUAGE plpgsql sdb_function_set_search_path AS $$ BEGIN - -- Function for biography insert and update triggers + -- Function for biography_data insert and update triggers -- -- AGPL_notice(` --', `2023', `The Meme Factory, Inc., www.karlpinc.com') -- Can't delete the unknown individual - restrict_delete(`BIOGRAPHY', `AnimID', `sdb_unk') + restrict_delete(`BIOGRAPHY_DATA', `AnimID', `sdb_unk') -- All but the youngest sibling (or siblings in the case of twins) -- must have FirstBorn of sdb_not_firstborn. - check_firstborn(`OLD', `Deleting the BIOGRAPHY row') + check_firstborn(`OLD', `Deleting the BIOGRAPHY_DATA row') RETURN NULL; END; $$; -RAISE INFO 'biography_trigger'; -CREATE TRIGGER biography_trigger +RAISE INFO 'biography_data_trigger'; +CREATE TRIGGER biography_data_trigger AFTER INSERT OR UPDATE - ON biography FOR EACH ROW - EXECUTE PROCEDURE biography_func(); + ON biography_data FOR EACH ROW + EXECUTE PROCEDURE biography_data_func(); -RAISE INFO 'biography_delete_trigger'; -CREATE TRIGGER biography_delete_trigger +RAISE INFO 'biography_data_delete_trigger'; +CREATE TRIGGER biography_data_delete_trigger AFTER DELETE - ON biography FOR EACH ROW - EXECUTE PROCEDURE biography_delete_func(); + ON biography_data FOR EACH ROW + EXECUTE PROCEDURE biography_data_delete_func(); diff --git a/db/schemas/lib/triggers/create/comm_membs.m4 b/db/schemas/lib/triggers/create/comm_membs.m4 index 9b8dcf6..625d91d 100644 --- a/db/schemas/lib/triggers/create/comm_membs.m4 +++ b/db/schemas/lib/triggers/create/comm_membs.m4 @@ -122,13 +122,13 @@ CREATE OR REPLACE FUNCTION comm_membs_func () -- An individual may not be placed in a community before the -- individual is under study. DECLARE - entrydate biography.entrydate%TYPE; + entrydate biography_data.entrydate%TYPE; BEGIN - SELECT biography.entrydate + SELECT biography_data.entrydate INTO entrydate - FROM biography - WHERE biography.animid = NEW.animid - AND NEW.startdate < biography.entrydate; + FROM biography_data + WHERE biography_data.animid = NEW.animid + AND NEW.startdate < biography_data.entrydate; IF FOUND THEN RAISE EXCEPTION integrity_constraint_violation USING MESSAGE = 'An individual may not be placed in a community' @@ -143,7 +143,7 @@ CREATE OR REPLACE FUNCTION comm_membs_func () || NEW.startdate || ') place the individual in the community before' || ' the individual came under study;' - || ' (BIOGRAPHY.EntryDate) = (' + || ' (BIOGRAPHY_DATA.EntryDate) = (' || entrydate || ')'; END IF; @@ -152,13 +152,13 @@ CREATE OR REPLACE FUNCTION comm_membs_func () -- An individual may not be placed in a community after the -- individual has left the study. DECLARE - departdate biography.departdate%TYPE; + departdate biography_data.departdate%TYPE; BEGIN - SELECT biography.departdate + SELECT biography_data.departdate INTO departdate - FROM biography - WHERE biography.animid = NEW.animid - AND biography.departdate < NEW.enddate; + FROM biography_data + WHERE biography_data.animid = NEW.animid + AND biography_data.departdate < NEW.enddate; IF FOUND THEN RAISE EXCEPTION integrity_constraint_violation USING MESSAGE = 'An individual may not be placed in a community' @@ -173,7 +173,7 @@ CREATE OR REPLACE FUNCTION comm_membs_func () || NEW.enddate || ') place the individual in the community after' || ' the individual left the study;' - || ' (BIOGRAPHY.Departdate) = (' + || ' (BIOGRAPHY_DATA.Departdate) = (' || departdate || ')'; END IF; diff --git a/db/schemas/lib/triggers/drop/biography.m4 b/db/schemas/lib/triggers/drop/biography_data.m4 similarity index 76% rename from db/schemas/lib/triggers/drop/biography.m4 rename to db/schemas/lib/triggers/drop/biography_data.m4 index 8ea5a38..465279f 100644 --- a/db/schemas/lib/triggers/drop/biography.m4 +++ b/db/schemas/lib/triggers/drop/biography_data.m4 @@ -1,4 +1,4 @@ -dnl Copyright (C) 2023 The Meme Factory, Inc. http://www.karlpinc.com/ +dnl Copyright (C) 2023, 2024 The Meme Factory, Inc. http://www.karlpinc.com/ dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU Affero General Public License as published by @@ -13,12 +13,12 @@ dnl dnl You should have received a copy of the GNU Affero General Public License dnl along with this program. If not, see . dnl -dnl Drop triggers for biography table +dnl Drop triggers for biography_data table dnl dnl Karl O. Pinc dnl m4 includes include(`copyright.m4')dnl -DROP FUNCTION IF EXISTS biography_func() CASCADE; -DROP FUNCTION IF EXISTS biography_delete_func CASCADE; +DROP FUNCTION IF EXISTS biography_data_func() CASCADE; +DROP FUNCTION IF EXISTS biography_data_delete_func CASCADE; diff --git a/db/schemas/sokwedb/indexes/Makefile b/db/schemas/sokwedb/indexes/Makefile index 01acbf6..69a2a0b 100644 --- a/db/schemas/sokwedb/indexes/Makefile +++ b/db/schemas/sokwedb/indexes/Makefile @@ -19,7 +19,7 @@ # This determines the order in which the indexes are put into the database. # This is not really important but is needed for other types of db objects. -ORDER := biography biography_log comm_membs comm_memb_log +ORDER := biography_data biography_log comm_membs comm_memb_log ## ## CAUTION: This Makefile is not designed to be run directly. It is normally diff --git a/db/schemas/sokwedb/indexes/create/biography.m4 b/db/schemas/sokwedb/indexes/create/biography_data.m4 similarity index 54% rename from db/schemas/sokwedb/indexes/create/biography.m4 rename to db/schemas/sokwedb/indexes/create/biography_data.m4 index 9679dc6..d7a51fc 100644 --- a/db/schemas/sokwedb/indexes/create/biography.m4 +++ b/db/schemas/sokwedb/indexes/create/biography_data.m4 @@ -1,4 +1,4 @@ -dnl Copyright (C) 2023 The Meme Factory, Inc., http://www.karlpinc.com/ +dnl Copyright (C) 2023, 2024 The Meme Factory, Inc., http://www.karlpinc.com/ dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU Affero General Public License as published @@ -21,26 +21,26 @@ include(`copyright.m4')dnl include(`constants.m4')dnl include(`macros.m4')dnl -CREATE UNIQUE INDEX IF NOT EXISTS biography_animidnum ON biography +CREATE UNIQUE INDEX IF NOT EXISTS biography_data_animidnum ON biography_data (animidnum); -CREATE UNIQUE INDEX IF NOT EXISTS biography_animname ON biography +CREATE UNIQUE INDEX IF NOT EXISTS biography_data_animname ON biography_data (animname); -CREATE INDEX IF NOT EXISTS biography_momid ON biography +CREATE INDEX IF NOT EXISTS biography_data_momid ON biography_data (momid); -CREATE INDEX IF NOT EXISTS biography_dadid ON biography +CREATE INDEX IF NOT EXISTS biography_data_dadid ON biography_data (dadid); -CREATE INDEX IF NOT EXISTS biography_birthdate ON biography +CREATE INDEX IF NOT EXISTS biography_data_birthdate ON biography_data (birthdate); -CREATE INDEX IF NOT EXISTS biography_bdmin ON biography +CREATE INDEX IF NOT EXISTS biography_data_bdmin ON biography_data (bdmin); -CREATE INDEX IF NOT EXISTS biography_bdmax ON biography +CREATE INDEX IF NOT EXISTS biography_data_bdmax ON biography_data (bdmax); -CREATE INDEX IF NOT EXISTS biography_entrydate ON biography +CREATE INDEX IF NOT EXISTS biography_data_entrydate ON biography_data (entrydate); -CREATE INDEX IF NOT EXISTS biography_entrytype ON biography +CREATE INDEX IF NOT EXISTS biography_data_entrytype ON biography_data (entrytype); -CREATE INDEX IF NOT EXISTS biography_departdate ON biography +CREATE INDEX IF NOT EXISTS biography_data_departdate ON biography_data (departdate); -CREATE INDEX IF NOT EXISTS biography_departtype ON biography +CREATE INDEX IF NOT EXISTS biography_data_departtype ON biography_data (departtype); diff --git a/db/schemas/sokwedb/indexes/drop/biography.m4 b/db/schemas/sokwedb/indexes/drop/biography_data.m4 similarity index 68% rename from db/schemas/sokwedb/indexes/drop/biography.m4 rename to db/schemas/sokwedb/indexes/drop/biography_data.m4 index cfd6811..f326b31 100644 --- a/db/schemas/sokwedb/indexes/drop/biography.m4 +++ b/db/schemas/sokwedb/indexes/drop/biography_data.m4 @@ -1,4 +1,4 @@ -dnl Copyright (C) 2023 The Meme Factory, Inc., http://www.karlpinc.com/ +dnl Copyright (C) 2023, 2024 The Meme Factory, Inc., http://www.karlpinc.com/ dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU Affero General Public License as published @@ -21,10 +21,10 @@ include(`copyright.m4')dnl include(`constants.m4')dnl include(`macros.m4')dnl -DROP INDEX IF EXISTS biography_animidnum; -DROP INDEX IF EXISTS biography_name; -DROP INDEX IF EXISTS biography_momid; -DROP INDEX IF EXISTS biography_dadid; -DROP INDEX IF EXISTS biography_birthdate; -DROP INDEX IF EXISTS biography_bdmin; -DROP INDEX IF EXISTS biography_bdmax; +DROP INDEX IF EXISTS biography_data_animidnum; +DROP INDEX IF EXISTS biography_data_name; +DROP INDEX IF EXISTS biography_data_momid; +DROP INDEX IF EXISTS biography_data_dadid; +DROP INDEX IF EXISTS biography_data_birthdate; +DROP INDEX IF EXISTS biography_data_bdmin; +DROP INDEX IF EXISTS biography_data_bdmax; diff --git a/db/schemas/sokwedb/tables/Makefile b/db/schemas/sokwedb/tables/Makefile index 05faf54..67dc9da 100644 --- a/db/schemas/sokwedb/tables/Makefile +++ b/db/schemas/sokwedb/tables/Makefile @@ -20,7 +20,7 @@ # This determines the order in which the tables are put into the database. # This is important because the tables containing foreign keys must be put # into the database after the tables they reference. -ORDER := biography \ +ORDER := biography_data \ biography_log \ comm_membs \ comm_memb_log \ diff --git a/db/schemas/sokwedb/tables/create/biography.m4 b/db/schemas/sokwedb/tables/create/biography_data.m4 similarity index 96% rename from db/schemas/sokwedb/tables/create/biography.m4 rename to db/schemas/sokwedb/tables/create/biography_data.m4 index 25b235f..ca53dc5 100644 --- a/db/schemas/sokwedb/tables/create/biography.m4 +++ b/db/schemas/sokwedb/tables/create/biography_data.m4 @@ -1,4 +1,4 @@ -dnl Copyright (C) 2023 The Meme Factory, Inc., http://www.karlpinc.com/ +dnl Copyright (C) 2023, 2024 The Meme Factory, Inc., http://www.karlpinc.com/ dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU Affero General Public License as published @@ -41,7 +41,7 @@ changequote(`,') -CREATE TABLE biography ( +CREATE TABLE biography_data ( animid TEXT PRIMARY KEY NOT NULL emptytext_check(`AnimID') nospaces_check(`AnimID') @@ -105,4 +105,4 @@ CREATE TABLE biography ( >= departdate - 'sdb_max_lifespan sdb_max_lifespan_units'::interval) ); -grant_priv(`BIOGRAPHY') +grant_priv(`BIOGRAPHY_DATA') diff --git a/doc/src/architecture/special_values.m4 b/doc/src/architecture/special_values.m4 index 342b10b..8dab9cc 100644 --- a/doc/src/architecture/special_values.m4 +++ b/doc/src/architecture/special_values.m4 @@ -1,4 +1,4 @@ -.. Copyright (C) 2023 The Meme Factory, Inc. www.karlpinc.com +.. Copyright (C) 2023, 2024 The Meme Factory, Inc. www.karlpinc.com This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as @@ -32,7 +32,7 @@ or deleting codes to or from the tables which define the system's vocabulary. At times, SokweDB recognizes that particular codes have special -meanings, for example, the |BIOGRAPHY| table's ``sdb_female`` (female) +meanings, for example, the |BIOGRAPHY_DATA| table's ``sdb_female`` (female) Sex code. The meaning of these codes is fixed into the logic of the system. As examples, an individual must be female to be allowed to have a menstruation, or, the individual must be in the community to be diff --git a/doc/src/epilog.inc.m4 b/doc/src/epilog.inc.m4 index 2f33620..c977866 100644 --- a/doc/src/epilog.inc.m4 +++ b/doc/src/epilog.inc.m4 @@ -1,4 +1,4 @@ -.. Copyright (C) 2019, 2023 The Meme Factory, Inc. www.karlpinc.com +.. Copyright (C) 2019, 2023, 2024 The Meme Factory, Inc. www.karlpinc.com This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as @@ -48,26 +48,46 @@ sdb_generated_rst()dnl the section heading and still get a link label with the name of the table or column. -.. |BIOGRAPHY| replace:: :ref:`BIOGRAPHY ` -.. |BIOGRAPHY.AnimID| replace:: :ref:`AnimID ` -.. |BIOGRAPHY.AnimIDNum| replace:: :ref:`AnimIDNum ` -.. |BIOGRAPHY.AnimName| replace:: :ref:`AnimName ` -.. |BIOGRAPHY.BirthComm| replace:: :ref:`BirthComm ` -.. |BIOGRAPHY.BCCertainty| replace:: :ref:`BCCertainty ` -.. |BIOGRAPHY.Sex| replace:: :ref:`Sex ` -.. |BIOGRAPHY.MomID| replace:: :ref:`MomID ` -.. |BIOGRAPHY.DadID| replace:: :ref:`DadID ` -.. |BIOGRAPHY.DadPrelim| replace:: :ref:`DadPrelim ` -.. |BIOGRAPHY.DadIDPub| replace:: :ref:`DadIDPub ` -.. |BIOGRAPHY.FirstBorn| replace:: :ref:`FirstBorn ` -.. |BIOGRAPHY.BirthDate| replace:: :ref:`BirthDate ` -.. |BIOGRAPHY.BDMin| replace:: :ref:`BDMin ` -.. |BIOGRAPHY.BDMax| replace:: :ref:`BDMax ` -.. |BIOGRAPHY.BDDist| replace:: :ref:`BDDist ` -.. |BIOGRAPHY.EntryDate| replace:: :ref:`EntryDate ` -.. |BIOGRAPHY.EntryType| replace:: :ref:`EntryType ` -.. |BIOGRAPHY.DepartDate| replace:: :ref:`DepartDate ` -.. |BIOGRAPHY.DepartType| replace:: :ref:`DepartType ` +.. |BIOGRAPHY_DATA| + replace:: :ref:`BIOGRAPHY_DATA ` +.. |BIOGRAPHY_DATA.AnimID| + replace:: :ref:`AnimID ` +.. |BIOGRAPHY_DATA.AnimIDNum| + replace:: :ref:`AnimIDNum ` +.. |BIOGRAPHY_DATA.AnimName| + replace:: :ref:`AnimName ` +.. |BIOGRAPHY_DATA.BirthComm| + replace:: :ref:`BirthComm ` +.. |BIOGRAPHY_DATA.BCCertainty| + replace:: :ref:`BCCertainty ` +.. |BIOGRAPHY_DATA.Sex| + replace:: :ref:`Sex ` +.. |BIOGRAPHY_DATA.MomID| + replace:: :ref:`MomID ` +.. |BIOGRAPHY_DATA.DadID| + replace:: :ref:`DadID ` +.. |BIOGRAPHY_DATA.DadPrelim| + replace:: :ref:`DadPrelim ` +.. |BIOGRAPHY_DATA.DadIDPub| + replace:: :ref:`DadIDPub ` +.. |BIOGRAPHY_DATA.FirstBorn| + replace:: :ref:`FirstBorn ` +.. |BIOGRAPHY_DATA.BirthDate| + replace:: :ref:`BirthDate ` +.. |BIOGRAPHY_DATA.BDMin| + replace:: :ref:`BDMin ` +.. |BIOGRAPHY_DATA.BDMax| + replace:: :ref:`BDMax ` +.. |BIOGRAPHY_DATA.BDDist| + replace:: :ref:`BDDist ` +.. |BIOGRAPHY_DATA.EntryDate| + replace:: :ref:`EntryDate ` +.. |BIOGRAPHY_DATA.EntryType| + replace:: :ref:`EntryType ` +.. |BIOGRAPHY_DATA.DepartDate| + replace:: :ref:`DepartDate ` +.. |BIOGRAPHY_DATA.DepartType| + replace:: :ref:`DepartType ` .. |BIOGRAPHY_LOG| replace:: :ref:`BIOGRAPHY_LOG ` .. |BIOGRAPHY_LOG.BLID| diff --git a/doc/src/tables.m4 b/doc/src/tables.m4 index af3d932..e7edd5b 100644 --- a/doc/src/tables.m4 +++ b/doc/src/tables.m4 @@ -28,7 +28,7 @@ Data Tables .. toctree:: :maxdepth: 3 - tables/biography.rst + tables/biography_data.rst tables/biography_log.rst tables/comm_membs.rst tables/comm_memb_log.rst diff --git a/doc/src/tables/biography.m4 b/doc/src/tables/biography_data.m4 similarity index 52% rename from doc/src/tables/biography.m4 rename to doc/src/tables/biography_data.m4 index 3d6bb51..0e4d968 100644 --- a/doc/src/tables/biography.m4 +++ b/doc/src/tables/biography_data.m4 @@ -19,35 +19,35 @@ include(macros.m4)dnl sdb_rst_quotes(`on')dnl sdb_generated_rst()dnl -.. _BIOGRAPHY: +.. _BIOGRAPHY_DATA: -BIOGRAPHY ---------- +BIOGRAPHY_DATA +-------------- -.. |BIOGRAPHY_summary| replace:: +.. |BIOGRAPHY_DATA_summary| replace:: Each row represents a chimpanzee. This table contains one row for each chimpanzee on which data has ever been recorded (in SokweDB), and an additional row for ``sdb_unk`` a generic value used when a chimpanzee is unrecognized. -|BIOGRAPHY_summary| BIOGRAPHY contains the basic demographic data of +|BIOGRAPHY_DATA_summary| BIOGRAPHY_DATA contains the basic demographic data of individual chimpanzees. -A mother must be female; the |BIOGRAPHY.Sex| must be ``sdb_female`` -(female) of the |BIOGRAPHY| row identified by an offspring's -|BIOGRAPHY.MomID|. +A mother must be female; the |BIOGRAPHY_DATA.Sex| must be ``sdb_female`` +(female) of the |BIOGRAPHY_DATA| row identified by an offspring's +|BIOGRAPHY_DATA.MomID|. -A father must be male; the |BIOGRAPHY.Sex| must be ``sdb_male`` (male) -of the |BIOGRAPHY| row identified by an offspring's |BIOGRAPHY.DadID|. +A father must be male; the |BIOGRAPHY_DATA.Sex| must be ``sdb_male`` (male) +of the |BIOGRAPHY_DATA| row identified by an offspring's |BIOGRAPHY_DATA.DadID|. .. Note that this next rule prevents an individual from being their own mother. A female cannot be too young when giving birth. The difference between the mother's maximum birthdate, the -|BIOGRAPHY.BDMin| of the |BIOGRAPHY| row identified by an offspring's -|BIOGRAPHY.MomID|, and the offspring's minimum birthdate, the -|BIOGRAPHY.BDMin| of the offspring, cannot be less than +|BIOGRAPHY_DATA.BDMin| of the |BIOGRAPHY_DATA| row identified by an offspring's +|BIOGRAPHY_DATA.MomID|, and the offspring's minimum birthdate, the +|BIOGRAPHY_DATA.BDMin| of the offspring, cannot be less than sdb_min_f_birth sdb_min_f_birth_units. .. Note that this next rule prevents an individual from being their @@ -55,275 +55,275 @@ sdb_min_f_birth sdb_min_f_birth_units. A male cannot be too young when becoming a parent. The difference between the father's maximum birthdate, the -|BIOGRAPHY.BDMin| of the |BIOGRAPHY| row identified by an offspring's -|BIOGRAPHY.DadID|, and the offspring's minimum birthdate, the -|BIOGRAPHY.BDMin| of the offspring, cannot be less than +|BIOGRAPHY_DATA.BDMin| of the |BIOGRAPHY_DATA| row identified by an offspring's +|BIOGRAPHY_DATA.DadID|, and the offspring's minimum birthdate, the +|BIOGRAPHY_DATA.BDMin| of the offspring, cannot be less than sdb_min_m_birth sdb_min_m_birth_units. When the individual is not the first recorded offspring of their -mother, based on the |BIOGRAPHY.BirthDate| of all recorded maternal -siblings, the |BIOGRAPHY.FirstBorn| value must be +mother, based on the |BIOGRAPHY_DATA.BirthDate| of all recorded maternal +siblings, the |BIOGRAPHY_DATA.FirstBorn| value must be ``sdb_not_firstborn`` (not first born). -The date the individual entered the study (|BIOGRAPHY.EntryDate|) may -not be before the individual's birth date (|BIOGRAPHY.BirthDate|). +The date the individual entered the study (|BIOGRAPHY_DATA.EntryDate|) may +not be before the individual's birth date (|BIOGRAPHY_DATA.BirthDate|). -The date the individual left the study (|BIOGRAPHY.DepartDate|) may +The date the individual left the study (|BIOGRAPHY_DATA.DepartDate|) may not be before the date the individual entered the study -(|BIOGRAPHY.EntryDate|). +(|BIOGRAPHY_DATA.EntryDate|). The maximum age of an individual, the time span between the -individual's earliest possible birth date (|BIOGRAPHY.BDMin|) and their -|BIOGRAPHY.DepartDate|, may not be more than sdb_max_lifespan +individual's earliest possible birth date (|BIOGRAPHY_DATA.BDMin|) and their +|BIOGRAPHY_DATA.DepartDate|, may not be more than sdb_max_lifespan sdb_max_lifespan_units. -sdb_null_iff_null(*m4[|BIOGRAPHY.DadPrelim|]m4*,*m4[|BIOGRAPHY.DadID|]m4*) -sdb_null_iff_null(*m4[|BIOGRAPHY.DadIDPub|]m4*,*m4[|BIOGRAPHY.DadID|]m4*) +sdb_null_iff_null(*m4[|BIOGRAPHY_DATA.DadPrelim|]m4*,*m4[|BIOGRAPHY_DATA.DadID|]m4*) +sdb_null_iff_null(*m4[|BIOGRAPHY_DATA.DadIDPub|]m4*,*m4[|BIOGRAPHY_DATA.DadID|]m4*) -The row defining the unknown individual, the ``BIOGRAPHY`` row having -an |BIOGRAPHY.AnimID| value of ``sdb_unk``, is +The row defining the unknown individual, the ``BIOGRAPHY_DATA`` row having +an |BIOGRAPHY_DATA.AnimID| value of ``sdb_unk``, is :ref:`special ` and cannot be altered or deleted by ordinary user accounts. -.. _BIOGRAPHY.AnimID: +.. _BIOGRAPHY_DATA.AnimID: AnimID (Animal IDentifier) `````````````````````````` -.. |BIOGRAPHY.AnimID_summary| replace:: +.. |BIOGRAPHY_DATA.AnimID_summary| replace:: A short sequence of characters which uniquely identify the chimpanzee. -|BIOGRAPHY.AnimID_summary| |keycol| |cannot_change| +|BIOGRAPHY_DATA.AnimID_summary| |keycol| |cannot_change| -.. _BIOGRAPHY.AnimIDNum: +.. _BIOGRAPHY_DATA.AnimIDNum: AnimIDNum (Animal IDentifier Number) ```````````````````````````````````` -.. |BIOGRAPHY.AnimIDNum_summary| replace:: +.. |BIOGRAPHY_DATA.AnimIDNum_summary| replace:: A unique positive integer used to identify the chimpanzee in SIV papers. -|BIOGRAPHY.AnimIDNum_summary| |unique| |allownull| +|BIOGRAPHY_DATA.AnimIDNum_summary| |unique| |allownull| These are the former Ch numbers from Beatrice Hahn's lab. -.. _BIOGRAPHY.AnimName: +.. _BIOGRAPHY_DATA.AnimName: AnimName (Animal Name) `````````````````````` -.. |BIOGRAPHY.AnimName_summary| replace:: +.. |BIOGRAPHY_DATA.AnimName_summary| replace:: The name of the chimpanzee. -|BIOGRAPHY.AnimName_summary| |unique| |emptytext| |notnull| +|BIOGRAPHY_DATA.AnimName_summary| |unique| |emptytext| |notnull| -.. _BIOGRAPHY.BirthComm: +.. _BIOGRAPHY_DATA.BirthComm: BirthComm (Birth Community) ``````````````````````````` -.. |BIOGRAPHY.BirthComm_summary| replace:: +.. |BIOGRAPHY_DATA.BirthComm_summary| replace:: The |COMM_IDS|.\ |COMM_IDS.CommID| of the community in which the individual was born. -|BIOGRAPHY.BirthComm_summary| This column may be |null| when the birth +|BIOGRAPHY_DATA.BirthComm_summary| This column may be |null| when the birth community is unknown. -.. _BIOGRAPHY.BCCertainty: +.. _BIOGRAPHY_DATA.BCCertainty: BCCertainty (Birth Community Certainty) ``````````````````````````````````````` -.. |BIOGRAPHY.BCCertainty_summary| replace:: - A code indicating the certainty of the |BIOGRAPHY.BirthComm|, the +.. |BIOGRAPHY_DATA.BCCertainty_summary| replace:: + A code indicating the certainty of the |BIOGRAPHY_DATA.BirthComm|, the certainty of the birth community. Only 2 values are allowed, ``sdb_bg_certain`` when the birth community is certain and ``sdb_bg_uncertain`` when the birth community is uncertain. -|BIOGRAPHY.BCCertainty_summary| |notnull| +|BIOGRAPHY_DATA.BCCertainty_summary| |notnull| -.. _BIOGRAPHY.Sex: +.. _BIOGRAPHY_DATA.Sex: Sex ``` -.. |BIOGRAPHY.Sex_summary| replace:: +.. |BIOGRAPHY_DATA.Sex_summary| replace:: A code indicating the sex of the individual. Only 3 values are allowed: ``sdb_male`` for males, ``sdb_female`` for females, and ``sdb_unk_sex`` when the sex is unknown. -|BIOGRAPHY.Sex_summary| |notnull| +|BIOGRAPHY_DATA.Sex_summary| |notnull| -.. _BIOGRAPHY.MomID: +.. _BIOGRAPHY_DATA.MomID: MomID (Mother's AnimID) ``````````````````````` -.. |BIOGRAPHY.MomID_summary| replace:: - The |BIOGRAPHY.AnimID| of the individual's mother, when known. +.. |BIOGRAPHY_DATA.MomID_summary| replace:: + The |BIOGRAPHY_DATA.AnimID| of the individual's mother, when known. -|BIOGRAPHY.MomID_summary| |allownull| +|BIOGRAPHY_DATA.MomID_summary| |allownull| -.. _BIOGRAPHY.DadID: +.. _BIOGRAPHY_DATA.DadID: DadID (Father's AnimID) ``````````````````````` -.. |BIOGRAPHY.DadID_summary| replace:: - The |BIOGRAPHY.AnimID| of the individual's father, or |null| when not known. +.. |BIOGRAPHY_DATA.DadID_summary| replace:: + The |BIOGRAPHY_DATA.AnimID| of the individual's father, or |null| when not known. -|BIOGRAPHY.DadID_summary| +|BIOGRAPHY_DATA.DadID_summary| |allownull| -.. _BIOGRAPHY.DadPrelim: +.. _BIOGRAPHY_DATA.DadPrelim: DadPrelim (Is Paternity Preliminary?) `````````````````````````````````````` -.. |BIOGRAPHY.DadPrelim_summary| replace:: +.. |BIOGRAPHY_DATA.DadPrelim_summary| replace:: A boolean value. When |true|, the paternity assignment is preliminary. -|BIOGRAPHY.DadPrelim_summary| |allownull| +|BIOGRAPHY_DATA.DadPrelim_summary| |allownull| -.. _BIOGRAPHY.DadIDPub: +.. _BIOGRAPHY_DATA.DadIDPub: DadIDPub (Publication of Paternity) ``````````````````````````````````` -.. |BIOGRAPHY.DadIDPub_summary| replace:: +.. |BIOGRAPHY_DATA.DadIDPub_summary| replace:: Citation of the publication where paternity was declared, or 'Unknown' when paternity has not yet been published. -|BIOGRAPHY.DadIDPub_summary| |emptytext| |allownull| +|BIOGRAPHY_DATA.DadIDPub_summary| |emptytext| |allownull| -.. _BIOGRAPHY.FirstBorn: +.. _BIOGRAPHY_DATA.FirstBorn: FirstBorn ````````` -.. |BIOGRAPHY.FirstBorn_summary| replace:: +.. |BIOGRAPHY_DATA.FirstBorn_summary| replace:: A code indicating whether the individual is the mother's first born. One of 3 values are allowed: ``sdb_firstborn`` means known to be the first born, ``sdb_not_firstborn`` means known not to be the first born, and ``sdb_unk_firstborn`` means that the firstborn status is unknown. -|BIOGRAPHY.FirstBorn_summary| |notnull| +|BIOGRAPHY_DATA.FirstBorn_summary| |notnull| -.. _BIOGRAPHY.BirthDate: +.. _BIOGRAPHY_DATA.BirthDate: BirthDate ````````` -.. |BIOGRAPHY.BirthDate_summary| replace:: +.. |BIOGRAPHY_DATA.BirthDate_summary| replace:: The individual's (often estimated) birth date. -|BIOGRAPHY.BirthDate_summary| |notnull| |birthlimits| +|BIOGRAPHY_DATA.BirthDate_summary| |notnull| |birthlimits| -.. _BIOGRAPHY.BDMin: +.. _BIOGRAPHY_DATA.BDMin: BDMin (Minimum Birth Date) `````````````````````````` -.. |BIOGRAPHY.BDMin_summary| replace:: +.. |BIOGRAPHY_DATA.BDMin_summary| replace:: The earliest possible birthdate. -|BIOGRAPHY.BDMin_summary| If born into the study, this is the last +|BIOGRAPHY_DATA.BDMin_summary| If born into the study, this is the last date prior to birth that the mother was seen without the infant. |notnull| |birthlimits| -.. _BIOGRAPHY.BDMax: +.. _BIOGRAPHY_DATA.BDMax: BDMin (Maximum Birth Date) `````````````````````````` -.. |BIOGRAPHY.BDMax_summary| replace:: +.. |BIOGRAPHY_DATA.BDMax_summary| replace:: The latest possible birthdate. -|BIOGRAPHY.BDMax_summary| If born into the study, this is date of the +|BIOGRAPHY_DATA.BDMax_summary| If born into the study, this is date of the first sighting of the infant. |notnull| |birthlimits| -.. _BIOGRAPHY.BDDist: +.. _BIOGRAPHY_DATA.BDDist: BDDist (Birth Date Distribution) ```````````````````````````````` -.. |BIOGRAPHY.BDDist_summary| replace:: +.. |BIOGRAPHY_DATA.BDDist_summary| replace:: The probability distribution of the likelihood of birth between - |BIOGRAPHY.BDMin| and |BIOGRAPHY.BDMax|. Only one of 2 values are + |BIOGRAPHY_DATA.BDMin| and |BIOGRAPHY_DATA.BDMax|. Only one of 2 values are allowed, ``sdb_bddist_normal`` when it is most likely that the - actual birthdate is closer to |BIOGRAPHY.BirthDate| than to - |BIOGRAPHY.BDMin| or |BIOGRAPHY.BDMax|, or ``sdb_bddist_uniform`` - when any birthdate between |BIOGRAPHY.BDMin| and |BIOGRAPHY.BDMax| + actual birthdate is closer to |BIOGRAPHY_DATA.BirthDate| than to + |BIOGRAPHY_DATA.BDMin| or |BIOGRAPHY_DATA.BDMax|, or ``sdb_bddist_uniform`` + when any birthdate between |BIOGRAPHY_DATA.BDMin| and |BIOGRAPHY_DATA.BDMax| is equally likely. -|BIOGRAPHY.BDDist_summary| |notnull| +|BIOGRAPHY_DATA.BDDist_summary| |notnull| -.. _BIOGRAPHY.EntryDate: +.. _BIOGRAPHY_DATA.EntryDate: EntryDate ````````` -.. |BIOGRAPHY.EntryDate_summary| replace:: +.. |BIOGRAPHY_DATA.EntryDate_summary| replace:: The date the individual entered the study; the date first seen. -|BIOGRAPHY.EntryDate_summary| |notnull| +|BIOGRAPHY_DATA.EntryDate_summary| |notnull| -.. _BIOGRAPHY.EntryType: +.. _BIOGRAPHY_DATA.EntryType: EntryType ````````` -.. |BIOGRAPHY.EntryType_summary| replace:: +.. |BIOGRAPHY_DATA.EntryType_summary| replace:: An |ENTRYTYPES|.\ |ENTRYTYPES.EntryType| code indicating how the individual entered the study. -|BIOGRAPHY.EntryType_summary| |notnull| +|BIOGRAPHY_DATA.EntryType_summary| |notnull| -.. _BIOGRAPHY.DepartDate: +.. _BIOGRAPHY_DATA.DepartDate: DepartDate `````````` -.. |BIOGRAPHY.DepartDate_summary| replace:: +.. |BIOGRAPHY_DATA.DepartDate_summary| replace:: The date the individual was last in the study, or the date the individual was last seen. For living individuals this is the date of last census. -|BIOGRAPHY.DepartDate_summary| |notnull| +|BIOGRAPHY_DATA.DepartDate_summary| |notnull| -.. _BIOGRAPHY.DepartType: +.. _BIOGRAPHY_DATA.DepartType: DepartType `````````` -.. |BIOGRAPHY.DepartType_summary| replace:: +.. |BIOGRAPHY_DATA.DepartType_summary| replace:: A |DEPARTTYPES|.\ |DEPARTTYPES.DepartType| code indicating that the individual is still alive and under study, or how the individual left the study. The |DEPARTTYPES|.\ |DEPARTTYPES.DepartType| ``sdb_end_of_obs`` value is special. It indicates the individual is still alive and in the community. -|BIOGRAPHY.DepartType_summary| |notnull| +|BIOGRAPHY_DATA.DepartType_summary| |notnull| .. |birthlimits| replace:: diff --git a/doc/src/tables/biography_log.m4 b/doc/src/tables/biography_log.m4 index c71f4d1..d8c1cec 100644 --- a/doc/src/tables/biography_log.m4 +++ b/doc/src/tables/biography_log.m4 @@ -25,7 +25,7 @@ BIOGRAPHY_LOG ------------- .. |BIOGRAPHY_LOG_summary| replace:: - Each row documents a change made to a |BIOGRAPHY| row. + Each row documents a change made to a |BIOGRAPHY_DATA| row. |BIOGRAPHY_LOG_summary| Changes have been logged since sdb_first_biography_log_date. @@ -61,7 +61,7 @@ AnimID (Animal IDentifier) `````````````````````````` .. |BIOGRAPHY_LOG.AnimID_summary| replace:: - The |BIOGRAPHY|.\ |BIOGRAPHY.AnimID| which identifies the + The |BIOGRAPHY_DATA|.\ |BIOGRAPHY_DATA.AnimID| which identifies the chimpanzee who's information was updated. |BIOGRAPHY_LOG.AnimID_summary| |notnull| @@ -84,7 +84,7 @@ Rationale ````````` .. |BIOGRAPHY_LOG.Rationale_summary| replace:: - The rationale for the change to the |BIOGRAPHY| data. + The rationale for the change to the |BIOGRAPHY_DATA| data. |BIOGRAPHY_LOG.Rationale_summary| |notempty| |notnull| diff --git a/doc/src/tables/comm_memb_log.m4 b/doc/src/tables/comm_memb_log.m4 index 0be4cc8..85964cf 100644 --- a/doc/src/tables/comm_memb_log.m4 +++ b/doc/src/tables/comm_memb_log.m4 @@ -67,7 +67,7 @@ AnimID (Animal IDentifier) `````````````````````````` .. |COMM_MEMB_LOG.AnimID_summary| replace:: - The |BIOGRAPHY|.\ |BIOGRAPHY.AnimID| which identifies the + The |BIOGRAPHY_DATA|.\ |BIOGRAPHY_DATA.AnimID| which identifies the chimpanzee who's community membership was updated. |COMM_MEMB_LOG.AnimID_summary| |notnull| diff --git a/doc/src/tables/comm_membs.m4 b/doc/src/tables/comm_membs.m4 index b2b200c..c9fc5bf 100644 --- a/doc/src/tables/comm_membs.m4 +++ b/doc/src/tables/comm_membs.m4 @@ -1,4 +1,4 @@ -.. Copyright (C) 2023 The Meme Factory, Inc. www.karlpinc.com +.. Copyright (C) 2023, 2024 The Meme Factory, Inc. www.karlpinc.com This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as @@ -54,9 +54,9 @@ of a ``COMM_MEMBS`` row having the same |COMM_MEMBS.AnimID| value. An individual may not be placed in a community unless that individual is under study; the |COMM_MEMBS.StartDate| may not be before the -individual's |BIOGRAPHY|.\ |BIOGRAPHY.EntryDate| and the +individual's |BIOGRAPHY_DATA|.\ |BIOGRAPHY_DATA.EntryDate| and the |COMM_MEMBS.EndDate| may not be after the individual's -|BIOGRAPHY|.\ |BIOGRAPHY.DepartDate|. +|BIOGRAPHY_DATA|.\ |BIOGRAPHY_DATA.DepartDate|. The |COMM_MEMBS.StartDate| must not be after the |COMM_MEMBS.EndDate|. @@ -78,7 +78,7 @@ AnimID (Animal IDentifier) `````````````````````````` .. |COMM_MEMBS.AnimID_summary| replace:: - The |BIOGRAPHY|.\ |BIOGRAPHY.AnimID| which identifies the + The |BIOGRAPHY_DATA|.\ |BIOGRAPHY_DATA.AnimID| which identifies the chimpanzee who's community membership is recorded. |COMM_MEMBS.AnimID_summary| |notnull| -- 2.34.1