changeset 2807:5ac1db5156be

Some oracle db schema adaptions specific to bed heights in MINFO. flys-backend/trunk@4215 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 11 Apr 2012 13:09:46 +0000
parents 33f40b23edd8
children b57c95094b68
files flys-backend/ChangeLog flys-backend/doc/schema/oracle-drop-minfo.sql flys-backend/doc/schema/oracle-minfo.sql
diffstat 3 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/ChangeLog	Wed Apr 11 09:30:04 2012 +0000
+++ b/flys-backend/ChangeLog	Wed Apr 11 13:09:46 2012 +0000
@@ -1,3 +1,9 @@
+2012-04-11  Ingo Weinzierl <ingo@intevation.de>
+
+	* doc/schema/oracle-minfo.sql,
+	  doc/schema/oracle-drop-minfo.sql: Some schema adaptions specific to bed
+	  heights in MINFO.
+
 2012-04-11  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/importer/Config.java: Added new command
--- a/flys-backend/doc/schema/oracle-drop-minfo.sql	Wed Apr 11 09:30:04 2012 +0000
+++ b/flys-backend/doc/schema/oracle-drop-minfo.sql	Wed Apr 11 13:09:46 2012 +0000
@@ -2,6 +2,7 @@
 
 ALTER TABLE elevation_model DROP CONSTRAINT fk_unit;
 ALTER TABLE bed_height_single DROP CONSTRAINT fk_type;
+ALTER TABLE bed_height_single DROP CONSTRAINT fk_location_system;
 ALTER TABLE bed_height_single DROP CONSTRAINT fk_cur_elevation_model;
 ALTER TABLE bed_height_single DROP CONSTRAINT fk_old_elevation_model;
 ALTER TABLE bed_height_single DROP CONSTRAINT fk_range;
--- a/flys-backend/doc/schema/oracle-minfo.sql	Wed Apr 11 09:30:04 2012 +0000
+++ b/flys-backend/doc/schema/oracle-minfo.sql	Wed Apr 11 13:09:46 2012 +0000
@@ -36,8 +36,9 @@
 CREATE TABLE bed_height_single (
     id                      NUMBER(38,0) NOT NULL,
     year                    NUMBER(38,0) NOT NULL,
-    sounding_with           NUMBER(38,0) NOT NULL,
+    sounding_width          NUMBER(38,0) NOT NULL,
     type_id                 NUMBER(38,0) NOT NULL,
+    location_system_id      NUMBER(38,0) NOT NULL,
     cur_elevation_model_id  NUMBER(38,0) NOT NULL,
     old_elevation_model_id  NUMBER(38,0),
     range_id                NUMBER(38,0) NOT NULL,
@@ -45,6 +46,7 @@
     description             VARCHAR(255),
     PRIMARY KEY(id),
     CONSTRAINT fk_type FOREIGN KEY (type_id) REFERENCES bed_height_type(id),
+    CONSTRAINT fk_location_system FOREIGN KEY (location_system_id) REFERENCES location_system(id),
     CONSTRAINT fk_cur_elevation_model FOREIGN KEY (cur_elevation_model_id) REFERENCES elevation_model(id),
     CONSTRAINT fk_old_elevation_model FOREIGN KEY (old_elevation_model_id) REFERENCES elevation_model(id),
     CONSTRAINT fk_range FOREIGN KEY (range_id) REFERENCES ranges(id)
@@ -80,6 +82,7 @@
     height                  NUMBER(38,2),
     uncertainty             NUMBER(38,2),
     data_gap                NUMBER(38,2) NOT NULL,
+    sounding_width          NUMBER(38,2) NOT NULL,
     width                   NUMBER(38,2) NOT NULL,
     PRIMARY KEY(id),
     CONSTRAINT fk_bed_single_values_parent FOREIGN KEY (bed_height_single_id) REFERENCES bed_height_single(id)

http://dive4elements.wald.intevation.org