# HG changeset patch # User Tom Gottfried # Date 1527068207 -7200 # Node ID 285146e8c9c501e6ea60c67a205cc23d98339bcd # Parent 6e8d571c720e3715c6745c142d1e39fa918546b1 Align constraints with WSDL (NOT NULL vs. minOccurs). diff -r 6e8d571c720e -r 285146e8c9c5 wamos.sql --- a/wamos.sql Thu May 17 15:52:21 2018 +0200 +++ b/wamos.sql Wed May 23 11:36:47 2018 +0200 @@ -87,10 +87,10 @@ CREATE TABLE bottlenecks ( bottleneck_id varchar PRIMARY KEY, - fk_g_fid isrs REFERENCES gauges, + fk_g_fid isrs NOT NULL REFERENCES gauges, -- XXX: DRC references "ch. 3.1.1", which does not exist in document. - objnam varchar UNIQUE NOT NULL, - nobjnm varchar UNIQUE, + objnam varchar, + nobjnm varchar, stretch isrsrange NOT NULL, area geometry(POLYGON, 3146) NOT NULL, rb char(2) NOT NULL REFERENCES countries, -- from rb_lb in interface @@ -100,7 +100,7 @@ limiting varchar NOT NULL REFERENCES limiting_factors, surtyp varchar NOT NULL REFERENCES survey_types, -- XXX: Also an attribut of sounding result? - coverage varchar NOT NULL REFERENCES coverage_types, + coverage varchar REFERENCES coverage_types, -- XXX: Also an attribut of sounding result? -- CHECK allowed combinations of surtyp and coverage or -- different model approach? @@ -126,7 +126,7 @@ PRIMARY KEY (bottleneck_id, date_info), area geometry(POLYGON, 3146) NOT NULL, surtyp varchar NOT NULL REFERENCES survey_types, - coverage varchar NOT NULL REFERENCES coverage_types, + coverage varchar REFERENCES coverage_types, depth_reference char(3) NOT NULL REFERENCES depth_references, sounding_data raster NOT NULL );