# HG changeset patch # User Tom Gottfried # Date 1536090105 -7200 # Node ID f3452ce5c056b80c4438c14d59219be8e7d9e839 # Parent 5e45f441aed67e3b0461c5c979afa8f1aa8c614a Make table writable for data import Lookup tables will probably be filled with data during import and thus should reside in the waterway schema, which is accordingly authorised. Touch only the one table relevant for bottlenecks here, as other data might be handled differently. Lookup tables referenced in out-commented columns not touched, as it is not yet clarified whether these columns will be removed completely. countries not touched neither, because it will be filled from different source and demo-data should have everything necessary to start importing bottlenecks. diff -r 5e45f441aed6 -r f3452ce5c056 schema/gemma.sql --- a/schema/gemma.sql Tue Sep 04 17:13:25 2018 +0200 +++ b/schema/gemma.sql Tue Sep 04 21:41:45 2018 +0200 @@ -154,10 +154,6 @@ coverage_type varchar PRIMARY KEY ); -CREATE TABLE limiting_factors ( - limiting_factor varchar PRIMARY KEY -); - CREATE TABLE measure_types ( measure_type varchar PRIMARY KEY ); @@ -347,6 +343,10 @@ -- -- Bottlenecks -- + CREATE TABLE limiting_factors ( + limiting_factor varchar PRIMARY KEY + ) + -- XXX: Nullability differs between DRC (attributes marked "O") and WSDL -- (minOccurs=0; nillable seems to be set arbitrarily as even bottleneck_id and -- fk_g_fid (both mandatory, i.e. marked "M" in DRC) have nillable="true" in WSDL) diff -r 5e45f441aed6 -r f3452ce5c056 schema/tap_tests_data.sql --- a/schema/tap_tests_data.sql Tue Sep 04 17:13:25 2018 +0200 +++ b/schema/tap_tests_data.sql Tue Sep 04 21:41:45 2018 +0200 @@ -17,7 +17,7 @@ INSERT INTO users.list_users VALUES ( 'sys_admin', 'test_sys_admin1', 'sys_admin1$', 'AT', NULL, 'zzz'); -INSERT INTO limiting_factors VALUES ('depth'), ('width'); +INSERT INTO waterway.limiting_factors VALUES ('depth'), ('width'); INSERT INTO waterway.gauges ( location, function_code, objname, geom, zero_point, source_organization)