changeset 2829:4074777afcfa

Added MINFO specific relations for flow velocity measurements. flys-backend/trunk@4246 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 17 Apr 2012 10:16:21 +0000
parents ac13e466a55e
children 6faa47ca1fee
files flys-backend/ChangeLog flys-backend/doc/schema/oracle-drop-minfo.sql flys-backend/doc/schema/oracle-minfo.sql
diffstat 3 files changed, 36 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- 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 <ingo@intevation.de>
+
+	* 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 <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/importer/parsers/FlowVelocityModelParser.java:
--- 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;
 
--- 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)
+);

http://dive4elements.wald.intevation.org