# HG changeset patch # User Ingo Weinzierl # Date 1334657781 0 # Node ID 4074777afcfaa2a4163ea14990b13b25d3ff1777 # Parent ac13e466a55e314708f9f2903edef1a3ded0f969 Added MINFO specific relations for flow velocity measurements. flys-backend/trunk@4246 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r ac13e466a55e -r 4074777afcfa flys-backend/ChangeLog --- a/flys-backend/ChangeLog Tue Apr 17 09:37:52 2012 +0000 +++ b/flys-backend/ChangeLog Tue Apr 17 10:16:21 2012 +0000 @@ -1,3 +1,9 @@ +2012-04-17 Ingo Weinzierl + + * doc/schema/oracle-minfo.sql, + doc/schema/oracle-drop-minfo.sql: Added new relations for MINFO specific + flow velocity measurements. + 2012-04-17 Ingo Weinzierl * src/main/java/de/intevation/flys/importer/parsers/FlowVelocityModelParser.java: diff -r ac13e466a55e -r 4074777afcfa flys-backend/doc/schema/oracle-drop-minfo.sql --- a/flys-backend/doc/schema/oracle-drop-minfo.sql Tue Apr 17 09:37:52 2012 +0000 +++ b/flys-backend/doc/schema/oracle-drop-minfo.sql Tue Apr 17 10:16:21 2012 +0000 @@ -24,6 +24,8 @@ ALTER TABLE flow_velocity_model DROP CONSTRAINT fk_fvm_discharge_zone_id; ALTER TABLE discharge_zone DROP CONSTRAINT fk_dz_river_id; ALTER TABLE discharge_zone DROP CONSTRAINT fk_dz_nmv_id; +ALTER TABLE flow_velocity_measurements DROP CONSTRAINT fk_fvm_rivers_id; +ALTER TABLE flow_velocity_measure_values DROP CONSTRAINT fk_fvmv_measurements_id; DROP TABLE bed_height_type; DROP TABLE location_system; @@ -40,6 +42,8 @@ DROP TABLE discharge_zone; DROP TABLE flow_velocity_model; DROP TABLE flow_velocity_model_values; +DROP TABLE flow_velocity_measurements; +DROP TABLE flow_velocity_measure_values; DROP SEQUENCE BED_HEIGHT_TYPE_SEQ; DROP SEQUENCE LOCATION_SYSTEM_SEQ; @@ -56,4 +60,6 @@ DROP SEQUENCE DISCHARGE_ZONE_ID_SEQ; DROP SEQUENCE FLOW_VELOCITY_MODEL_ID_SEQ; DROP SEQUENCE FLOW_VELOCITY_M_VALUES_ID_SEQ; +DROP SEQUENCE FV_MEASURE_ID_SEQ; +DROP SEQUENCE FV_MEASURE_VALUES_ID_SEQ; diff -r ac13e466a55e -r 4074777afcfa flys-backend/doc/schema/oracle-minfo.sql --- a/flys-backend/doc/schema/oracle-minfo.sql Tue Apr 17 09:37:52 2012 +0000 +++ b/flys-backend/doc/schema/oracle-minfo.sql Tue Apr 17 10:16:21 2012 +0000 @@ -213,14 +213,27 @@ ---CREATE SEQUENCE --- ---CREATE TABLE flow_velocity_measurements ( --- ---); --- ---CREATE SEQUENCE --- ---CREATE TABLE flow_velocity_measurements_values ( --- ---); +CREATE SEQUENCE FV_MEASURE_ID_SEQ; + +CREATE TABLE flow_velocity_measurements ( + id NUMBER(38,0) NOT NULL, + river_id NUMBER(38,0) NOT NULL, + description VARCHAR(256), + PRIMARY KEY (id), + CONSTRAINT fk_fvm_rivers_id FOREIGN KEY (river_id) REFERENCES rivers(id) +); + +CREATE SEQUENCE FV_MEASURE_VALUES_ID_SEQ; + +CREATE TABLE flow_velocity_measure_values ( + id NUMBER(38,0) NOT NULL, + measurements_id NUMBER(38,0) NOT NULL, + station NUMBER(38,3) NOT NULL, + datetime TIMESTAMP, + w NUMBER(38,3) NOT NULL, + q NUMBER(38,3) NOT NULL, + v NUMBER(38,3) NOT NULL, + description VARCHAR(256), + PRIMARY KEY (id), + CONSTRAINT fk_fvmv_measurements_id FOREIGN KEY (measurements_id) REFERENCES flow_velocity_measurements (id) +);