Project

General

Profile

« Previous | Next » 

Revision 5770

schemas/vegbien.sql: plantobservation: Made taxonoccurrence_id optional when sourceaccessioncode is specified, so that aggregateoccurrence doesn't get pruned away in datasource tables that link just a stemobservation to a plantobservation (and therefore don't provide a taxonoccurrence to satisfy the previous taxonoccurrence_id NOT NULL constraint)

View differences:

vegbien.sql
1379 1379
    plantobservation_id integer NOT NULL,
1380 1380
    creator_id integer NOT NULL,
1381 1381
    sourceaccessioncode text,
1382
    aggregateoccurrence_id integer NOT NULL,
1382
    aggregateoccurrence_id integer,
1383 1383
    overallheight_m double precision,
1384 1384
    overallheightaccuracy_m double precision,
1385 1385
    collectionnumber text,
1386 1386
    stemcount integer,
1387 1387
    plant_id integer,
1388
    accessioncode text
1388
    accessioncode text,
1389
    CONSTRAINT plantobservation_required_key CHECK (((sourceaccessioncode IS NOT NULL) OR (aggregateoccurrence_id IS NOT NULL)))
1389 1390
);
1390 1391

  
1391 1392

  

Also available in: Unified diff