changeset 8666:1a4ad0d4231a

(issue1763) Use more distinct constraint names and adapt drop-script.
author Tom Gottfried <tom@intevation.de>
date Wed, 08 Apr 2015 18:15:55 +0200
parents 8fbc0649da13
children 0c241f03ebcd
files backend/doc/schema/oracle-drop-minfo.sql backend/doc/schema/oracle-minfo.sql backend/doc/schema/postgresql-minfo.sql
diffstat 3 files changed, 23 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/backend/doc/schema/oracle-drop-minfo.sql	Wed Apr 08 14:47:30 2015 +0200
+++ b/backend/doc/schema/oracle-drop-minfo.sql	Wed Apr 08 18:15:55 2015 +0200
@@ -1,13 +1,13 @@
 SET AUTOCOMMIT ON;
 
 ALTER TABLE elevation_model DROP CONSTRAINT fk_unit;
-ALTER TABLE bed_height_single DROP CONSTRAINT fk_bed_single_river_id;
-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;
-ALTER TABLE bed_height_single_values DROP CONSTRAINT fk_bed_single_values_parent;
+ALTER TABLE bed_height DROP CONSTRAINT fk_bh_river_id;
+ALTER TABLE bed_height DROP CONSTRAINT fk_bh_type;
+ALTER TABLE bed_height DROP CONSTRAINT fk_bh_location_system;
+ALTER TABLE bed_height DROP CONSTRAINT fk_bh_cur_elevation_model;
+ALTER TABLE bed_height DROP CONSTRAINT fk_bh_old_elevation_model;
+ALTER TABLE bed_height DROP CONSTRAINT fk_bh_range;
+ALTER TABLE bed_height_values DROP CONSTRAINT fk_bed_values_parent;
 ALTER TABLE sediment_density DROP CONSTRAINT fk_sd_depth_id;
 ALTER TABLE sediment_density_values DROP CONSTRAINT fk_sdv_sediment_density_id;
 ALTER TABLE morphologic_width DROP CONSTRAINT fk_mw_river_id;
@@ -41,8 +41,8 @@
 DROP TABLE bed_height_type PURGE;
 DROP TABLE location_system PURGE;
 DROP TABLE elevation_model PURGE;
-DROP TABLE bed_height_single PURGE;
-DROP TABLE bed_height_single_values PURGE;
+DROP TABLE bed_height PURGE;
+DROP TABLE bed_height_values PURGE;
 DROP TABLE depths PURGE;
 DROP TABLE sediment_density PURGE;
 DROP TABLE sediment_density_values PURGE;
@@ -64,8 +64,8 @@
 
 DROP SEQUENCE LOCATION_SYSTEM_SEQ;
 DROP SEQUENCE ELEVATION_MODEL_SEQ;
-DROP SEQUENCE BED_HEIGHT_SINGLE_ID_SEQ;
-DROP SEQUENCE BED_SINGLE_VALUES_ID_SEQ;
+DROP SEQUENCE BED_HEIGHT_ID_SEQ;
+DROP SEQUENCE BED_HEIGHT_VALUES_ID_SEQ;
 DROP SEQUENCE DEPTHS_ID_SEQ;
 DROP SEQUENCE SEDIMENT_DENSITY_ID_SEQ;
 DROP SEQUENCE SEDIMENT_DENSITY_VALUES_ID_SEQ;
--- a/backend/doc/schema/oracle-minfo.sql	Wed Apr 08 14:47:30 2015 +0200
+++ b/backend/doc/schema/oracle-minfo.sql	Wed Apr 08 18:15:55 2015 +0200
@@ -49,16 +49,16 @@
     evaluation_by           VARCHAR(255),
     description             VARCHAR(255),
     PRIMARY KEY(id),
-    CONSTRAINT fk_bed_river_id FOREIGN KEY (river_id)
+    CONSTRAINT fk_bh_river_id FOREIGN KEY (river_id)
         REFERENCES rivers(id) ON DELETE CASCADE,
-    CONSTRAINT fk_type FOREIGN KEY (type_id) REFERENCES bed_height_type(id),
-    CONSTRAINT fk_location_system FOREIGN KEY (location_system_id)
+    CONSTRAINT fk_bh_type FOREIGN KEY (type_id) REFERENCES bed_height_type(id),
+    CONSTRAINT fk_bh_location_system FOREIGN KEY (location_system_id)
         REFERENCES location_system(id),
-    CONSTRAINT fk_cur_elevation_model FOREIGN KEY (cur_elevation_model_id)
+    CONSTRAINT fk_bh_cur_elevation_model FOREIGN KEY (cur_elevation_model_id)
         REFERENCES elevation_model(id),
-    CONSTRAINT fk_old_elevation_model FOREIGN KEY (old_elevation_model_id)
+    CONSTRAINT fk_bh_old_elevation_model FOREIGN KEY (old_elevation_model_id)
         REFERENCES elevation_model(id),
-    CONSTRAINT fk_range FOREIGN KEY (range_id)
+    CONSTRAINT fk_bh_range FOREIGN KEY (range_id)
         REFERENCES ranges(id) ON DELETE CASCADE
 );
 
--- a/backend/doc/schema/postgresql-minfo.sql	Wed Apr 08 14:47:30 2015 +0200
+++ b/backend/doc/schema/postgresql-minfo.sql	Wed Apr 08 18:15:55 2015 +0200
@@ -49,16 +49,16 @@
     evaluation_by           VARCHAR(255),
     description             VARCHAR(255),
     PRIMARY KEY(id),
-    CONSTRAINT fk_bed_river_id FOREIGN KEY (river_id)
+    CONSTRAINT fk_bh_river_id FOREIGN KEY (river_id)
         REFERENCES rivers(id) ON DELETE CASCADE,
-    CONSTRAINT fk_type FOREIGN KEY (type_id) REFERENCES bed_height_type(id),
-    CONSTRAINT fk_location_system FOREIGN KEY (location_system_id)
+    CONSTRAINT fk_bh_type FOREIGN KEY (type_id) REFERENCES bed_height_type(id),
+    CONSTRAINT fk_bh_location_system FOREIGN KEY (location_system_id)
         REFERENCES location_system(id),
-    CONSTRAINT fk_cur_elevation_model FOREIGN KEY (cur_elevation_model_id)
+    CONSTRAINT fk_bh_cur_elevation_model FOREIGN KEY (cur_elevation_model_id)
         REFERENCES elevation_model(id),
-    CONSTRAINT fk_old_elevation_model FOREIGN KEY (old_elevation_model_id)
+    CONSTRAINT fk_bh_old_elevation_model FOREIGN KEY (old_elevation_model_id)
         REFERENCES elevation_model(id),
-    CONSTRAINT fk_range FOREIGN KEY (range_id)
+    CONSTRAINT fk_bh_range FOREIGN KEY (range_id)
         REFERENCES ranges(id) ON DELETE CASCADE
 );
 

http://dive4elements.wald.intevation.org