From a09ae292403af3b7f0b5657e625729273b5092a6 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Fri, 5 Jun 2026 19:41:14 +0000 Subject: [PATCH] Remove the HUMANS.HuID column and use EID as the primary key --- db/schemas/sokwedb/tables/create/humans.m4 | 5 ++-- doc/diagrams/events.svg | 30 ++++------------------ doc/src/epilog.inc.m4 | 2 -- doc/src/tables/humans.m4 | 12 +-------- 4 files changed, 9 insertions(+), 40 deletions(-) diff --git a/db/schemas/sokwedb/tables/create/humans.m4 b/db/schemas/sokwedb/tables/create/humans.m4 index cffe096..a0a136d 100644 --- a/db/schemas/sokwedb/tables/create/humans.m4 +++ b/db/schemas/sokwedb/tables/create/humans.m4 @@ -24,8 +24,7 @@ include(`grants.m4')dnl dnl CREATE TABLE humans ( - key_column(`HUMANS', `HID', `INTEGER') - ,eid INTEGER NOT NULL + eid INTEGER NOT NULL REFERENCES events ,researchers INTEGER NOT NULL nonnegative_check(`Researchers') @@ -36,4 +35,6 @@ CREATE TABLE humans ( CHECK ((researchers > 0) OR (nonresearchers > 0)) ); +eid_primary_key(`HUMANS') + grant_priv(`HUMANS') diff --git a/doc/diagrams/events.svg b/doc/diagrams/events.svg index 3d88b1b..0cb7f89 100644 --- a/doc/diagrams/events.svg +++ b/doc/diagrams/events.svg @@ -821,8 +821,8 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="3.6096384" - inkscape:cx="242.68359" - inkscape:cy="903.27607" + inkscape:cx="643.8318" + inkscape:cy="615.15857" inkscape:document-units="mm" inkscape:current-layer="layer3" inkscape:document-rotation="0" @@ -1483,12 +1483,12 @@ xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.82223px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" x="142.56032" - y="158.79703" + y="162.50114" id="text2064-6-17-7">HUMANS - Species * - HID ` .. |HUMANS| replace:: :ref:`HUMANS ` -.. |HUMANS.HID| replace:: - :ref:`HID ` .. |HUMANS.EID| replace:: :ref:`EID ` .. |HUMANS.Researchers| replace:: diff --git a/doc/src/tables/humans.m4 b/doc/src/tables/humans.m4 index ae576df..dd74e04 100644 --- a/doc/src/tables/humans.m4 +++ b/doc/src/tables/humans.m4 @@ -39,17 +39,6 @@ matches the HUMANS row's |HUMANS.EID| value must have an |EVENTS|\ :depth: 2 -.. _HUMANS.HID: - -HID (Humans ID) -``````````````` - -.. |HUMANS.HID_summary| replace:: - |idcol| - -|HUMANS.HID_summary| |notnull| - - .. _HUMANS.EID: EID (Event IDentifier) @@ -58,6 +47,7 @@ EID (Event IDentifier) .. |HUMANS.EID_summary| replace:: The |EVENTS|.\ |EVENTS.EID| that identifies the event which records the presence of non-chimpanzee species. + |idcol| |HUMANS.EID_summary| |notnull| -- 2.34.1