Mercurial > gemma
changeset 567:f3452ce5c056
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.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Tue, 04 Sep 2018 21:41:45 +0200 |
parents | 5e45f441aed6 |
children | 99968a7394f7 |
files | schema/gemma.sql schema/tap_tests_data.sql |
diffstat | 2 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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)