[PATCH] (issue1763) Use more distinct constraint names and adapt drop-script
Wald Commits
scm-commit at wald.intevation.org
Wed Apr 8 18:15:59 CEST 2015
# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1428509755 -7200
# Node ID 1a4ad0d4231a15cc943048e20dc405aedd3aa914
# Parent 8fbc0649da135cf7799560c77d9494db094ddcf7
(issue1763) Use more distinct constraint names and adapt drop-script.
diff -r 8fbc0649da13 -r 1a4ad0d4231a backend/doc/schema/oracle-drop-minfo.sql
--- 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;
diff -r 8fbc0649da13 -r 1a4ad0d4231a backend/doc/schema/oracle-minfo.sql
--- 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
);
diff -r 8fbc0649da13 -r 1a4ad0d4231a backend/doc/schema/postgresql-minfo.sql
--- 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
);
More information about the Dive4Elements-commits
mailing list