Mercurial > dive4elements > river
diff flys-backend/doc/schema/postgresql-minfo.sql @ 5452:5287440b57b3
merged.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 27 Mar 2013 11:48:53 +0100 |
parents | b279f2d4bc78 |
children | 303701ab73c6 |
line wrap: on
line diff
--- a/flys-backend/doc/schema/postgresql-minfo.sql Wed Mar 27 11:47:56 2013 +0100 +++ b/flys-backend/doc/schema/postgresql-minfo.sql Wed Mar 27 11:48:53 2013 +0100 @@ -40,13 +40,13 @@ CREATE TABLE bed_height_single ( id int NOT NULL, river_id int NOT NULL, - year int NOT NULL, - sounding_width int NOT NULL, + year int, + sounding_width int, type_id int NOT NULL, location_system_id int NOT NULL, cur_elevation_model_id int NOT NULL, old_elevation_model_id int, - range_id int NOT NULL, + range_id int, evaluation_by VARCHAR(255), description VARCHAR(255), PRIMARY KEY(id), @@ -69,7 +69,7 @@ -- type_id int NOT NULL, cur_elevation_model_id int NOT NULL, old_elevation_model_id int, - range_id int NOT NULL, + range_id int, evaluation_by VARCHAR(255), description VARCHAR(255), PRIMARY KEY(id), @@ -114,9 +114,7 @@ id int NOT NULL, lower NUMERIC NOT NULL, upper NUMERIC NOT NULL, - unit_id int NOT NULL, - PRIMARY KEY(id), - CONSTRAINT fk_depths_unit_id FOREIGN KEY (unit_id) REFERENCES units(id) + PRIMARY KEY(id) ); @@ -126,12 +124,10 @@ id int NOT NULL, river_id int NOT NULL, depth_id int NOT NULL, - unit_id int NOT NULL, description VARCHAR(256), PRIMARY KEY(id), CONSTRAINT fk_sd_river_id FOREIGN KEY (river_id) REFERENCES rivers(id) ON DELETE CASCADE, - CONSTRAINT fk_sd_depth_id FOREIGN KEY (depth_id) REFERENCES depths(id), - CONSTRAINT fk_sd_unit_id FOREIGN KEY (unit_id) REFERENCES units(id) + CONSTRAINT fk_sd_depth_id FOREIGN KEY (depth_id) REFERENCES depths(id) ); @@ -287,7 +283,7 @@ name VARCHAR(256) NOT NULL, river_id int NOT NULL, station NUMERIC NOT NULL, - range_id int NOT NULL, + range_id int, measurement_type VARCHAR(64) NOT NULL, riverside VARCHAR(16), reference_gauge_id int, @@ -322,7 +318,6 @@ id int NOT NULL, sq_relation_id int NOT NULL, measurement_station_id int NOT NULL, - parameter VARCHAR(16) NOT NULL, fraction VARCHAR(32) NOT NULL, a NUMERIC NOT NULL, b NUMERIC NOT NULL, @@ -334,6 +329,6 @@ cduan NUMERIC, PRIMARY KEY (id), CONSTRAINT fk_sqr_id FOREIGN KEY (sq_relation_id) REFERENCES sq_relation(id) ON DELETE CASCADE, - CONSTRAINT fk_mstation_id FOREIGN KEY (m_station_id) REFERENCES measurement_station(id) + CONSTRAINT fk_mstation_id FOREIGN KEY (measurement_station_id) REFERENCES measurement_station(id) ); COMMIT;