From 79936e53ede67ea8ddcd9550a1a1d07fe5fcc137 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Fri, 5 Jun 2026 23:05:54 +0000 Subject: [PATCH] Remove the SPECIES_PRESENT.OSID column and use EID as the primary key --- .../sokwedb/tables/create/species_present.m4 | 5 +- doc/diagrams/events.svg | 48 ++++++------------- doc/src/epilog.inc.m4 | 2 - doc/src/tables/species_present.m4 | 12 +---- 4 files changed, 18 insertions(+), 49 deletions(-) diff --git a/db/schemas/sokwedb/tables/create/species_present.m4 b/db/schemas/sokwedb/tables/create/species_present.m4 index cbe50a1..beba8df 100644 --- a/db/schemas/sokwedb/tables/create/species_present.m4 +++ b/db/schemas/sokwedb/tables/create/species_present.m4 @@ -24,12 +24,13 @@ include(`grants.m4')dnl dnl CREATE TABLE species_present ( - key_column(`SPECIES_PRESENT', `OSID', INTEGER) - ,eid INTEGER NOT NULL + eid INTEGER NOT NULL REFERENCES events ,species TEXT NOT NULL CONSTRAINT "Species must be a SPECIES.Species value" REFERENCES species ); +eid_primary_key(`SPECIES_PRESENT') + grant_priv(`SPECIES_PRESENT') diff --git a/doc/diagrams/events.svg b/doc/diagrams/events.svg index 0cb7f89..7602540 100644 --- a/doc/diagrams/events.svg +++ b/doc/diagrams/events.svg @@ -1440,44 +1440,36 @@ 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.71864" - y="140.39386" + y="144.09798" id="text2064-6-17">SPECIES_PRESENT - EID - OSID ` .. |SPECIES_PRESENT| replace:: :ref:`SPECIES_PRESENT ` -.. |SPECIES_PRESENT.OSID| replace:: - :ref:`OSID ` .. |SPECIES_PRESENT.EID| replace:: :ref:`EID ` .. |SPECIES_PRESENT.Species| replace:: diff --git a/doc/src/tables/species_present.m4 b/doc/src/tables/species_present.m4 index bbd823c..76903f2 100644 --- a/doc/src/tables/species_present.m4 +++ b/doc/src/tables/species_present.m4 @@ -38,17 +38,6 @@ have an |EVENTS|\ .|EVENTS.Behavior| value of ``sdb_other_species``. :depth: 2 -.. _SPECIES_PRESENT.OSID: - -OSID (Other Species ID) -``````````````````````` - -.. |SPECIES_PRESENT.OSID_summary| replace:: - |idcol| - -|SPECIES_PRESENT.OSID_summary| |notnull| - - .. _SPECIES_PRESENT.EID: EID (Event IDentifier) @@ -57,6 +46,7 @@ EID (Event IDentifier) .. |SPECIES_PRESENT.EID_summary| replace:: The |EVENTS|.\ |EVENTS.EID| that identifies the event which records the presence of non-chimpanzee species. + |idcol| |SPECIES_PRESENT.EID_summary| |notnull| -- 2.34.1