Have BIOGRAPHY.DadIDPub follow the same NULL rules as DadPrelim
authorKarl O. Pinc kop@karlpinc.com <kop@karlpinc.com>
Thu, 18 Jan 2024 21:38:01 +0000 (21:38 +0000)
committerKarl O. Pinc kop@karlpinc.com <kop@karlpinc.com>
Thu, 18 Jan 2024 21:38:01 +0000 (21:38 +0000)
This change is questionable, since querying on DadIDPub would be
slightly wonky.  But we don't really anticipate queries.

db/schemas/sokwedb/tables/create/biography.m4
doc/src/tables/biography.m4

index 0a751d6e69588e4888a6d50ce301cf7229b005a6..f59f21260d62f20260e2b4c7387e09984593e020 100644 (file)
@@ -66,8 +66,9 @@ CREATE TABLE biography (
   ,animid_type_column(`dadid', `DadID', `NULL')
   ,dadprelim BOOLEAN
              null_iff_null(`DadPrelim', `DadID')
-  ,dadidpub TEXT NOT NULL
+  ,dadidpub TEXT
             emptytext_check(`DadIDPub')
+            null_iff_null(`DadIDPub', `DadID')
   ,firstborn CHAR(1) NOT NULL
     CONSTRAINT
     "FirstBorn must be one of: sdb_firstborn sdb_not_firstborn sdb_unk_firstborn"
index dc9fe36173239c3e534fd99de70f797ab1235f9b..de262281076eb133c255aa195c2f09f07e2eea69 100644 (file)
@@ -204,7 +204,10 @@ DadIDPub (Publication of Paternity)
    Citation of the publication where paternity was declared, or 'Unknown' when
    paternity has not yet been published.
 
-|BIOGRAPHY.DadIDPub_summary| |emptytext| |notnull|
+|BIOGRAPHY.DadIDPub_summary| |emptytext|
+sdb_null_iff_null({|BIOGRAPHY.DadID|})
+
+|allownull|
 
 
 .. _BIOGRAPHY.FirstBorn: