-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into delta_1.5.x_dss_rename_xxx_fk_overflow_cha…
…racteristic_to_fk_overflow_char
- Loading branch information
Showing
30 changed files
with
424 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
ARG POSTGIS_VERSION=11-3.2 | ||
ARG POSTGIS_VERSION=14-3.2 | ||
FROM postgis/postgis:${POSTGIS_VERSION} | ||
|
||
# System deps | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-------- | ||
-- View for the swmm module class outfalls now includes infiltration installations | ||
-------- | ||
SELECT 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
ALTER TABLE qgep_sys.value_list_base | ||
ALTER COLUMN value_en TYPE character varying(100); | ||
ALTER TABLE qgep_sys.value_list_base | ||
ALTER COLUMN value_de TYPE character varying(100); | ||
ALTER TABLE qgep_sys.value_list_base | ||
ALTER COLUMN value_fr TYPE character varying(100); | ||
ALTER TABLE qgep_sys.value_list_base | ||
ALTER COLUMN value_it TYPE character varying(100); | ||
ALTER TABLE qgep_sys.value_list_base | ||
ALTER COLUMN value_ro TYPE character varying(100); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
UPDATE qgep_vl.channel_function_hierarchic | ||
SET order_fct_hierarchic= | ||
array_position( | ||
ARRAY[ | ||
5068 --pwwf.water_bodies | ||
,5070 --pwwf.main_drain_regional | ||
,5069 --pwwf.main_drain | ||
,5071 --pwwf.collector_sewer | ||
,5062 --pwwf.renovation_conduction | ||
,5064 --pwwf.residential_drainage | ||
,5072 --pwwf.road_drainage | ||
,5066 --pwwf.other | ||
,5074 --pwwf.unknown | ||
,5063 --swwf.renovation_conduction | ||
,5065 --swwf.residential_drainage | ||
,5073 --swwf.road_drainage | ||
,5067 --swwf.other | ||
,5075 --swwf.unknown | ||
] | ||
,code) |
69 changes: 69 additions & 0 deletions
69
delta/delta_1.6.1_dss_rename_xxx_fk_chute_to_fk_surface_water_bodies.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
-- class water_catchment | ||
--1. add correct fk_surface_water_bodies | ||
ALTER TABLE IF EXISTS qgep_od.water_catchment ADD COLUMN fk_surface_water_bodies varchar (16); | ||
|
||
-- 2. add correct CONSTRAINT | ||
-- ALTER TABLE qgep_od.water_catchment ADD CONSTRAINT rel_water_catchment_chute FOREIGN KEY (fk_chute) REFERENCES qgep_od.surface_water_bodies(obj_id) ON UPDATE CASCADE ON DELETE set null; | ||
|
||
ALTER TABLE IF EXISTS qgep_od.water_catchment ADD CONSTRAINT rel_water_catchment_surface_water_bodies FOREIGN KEY (fk_surface_water_bodies) REFERENCES qgep_od.surface_water_bodies(obj_id) ON UPDATE CASCADE ON DELETE set null; | ||
|
||
--3. copy data from fk_chute to fk_surface_water_bodies | ||
UPDATE qgep_od.water_catchment | ||
SET fk_surface_water_bodies = fk_chute; | ||
|
||
-- 4. delete old rel_water_catchment_chute constraint | ||
ALTER TABLE IF EXISTS qgep_od.water_catchment DROP CONSTRAINT rel_water_catchment_chute; | ||
|
||
-- 5. delete wrong fk_chute column | ||
ALTER TABLE IF EXISTS qgep_od.water_catchment DROP COLUMN fk_chute; | ||
|
||
-- 6. rename wrong value in qgep_sys.dictionary_od_field | ||
-- not needed as fk_attributes are not in qgep_sys tables | ||
|
||
|
||
-- class bathing_area | ||
--1. add correct fk_surface_water_bodies | ||
ALTER TABLE IF EXISTS qgep_od.bathing_area ADD COLUMN fk_surface_water_bodies varchar (16); | ||
|
||
-- 2. add correct CONSTRAINT | ||
-- ALTER TABLE qgep_od.bathing_area ADD CONSTRAINT rel_bathing_area_chute FOREIGN KEY (fk_chute) REFERENCES qgep_od.surface_water_bodies(obj_id) ON UPDATE CASCADE ON DELETE set null; | ||
|
||
ALTER TABLE IF EXISTS qgep_od.bathing_area ADD CONSTRAINT rel_bathing_area_surface_water_bodies FOREIGN KEY (fk_surface_water_bodies) REFERENCES qgep_od.surface_water_bodies(obj_id) ON UPDATE CASCADE ON DELETE set null; | ||
|
||
--3. copy data from fk_chute to fk_surface_water_bodies | ||
UPDATE qgep_od.bathing_area | ||
SET fk_surface_water_bodies = fk_chute; | ||
|
||
-- 4. delete old rel_water_catchment_chute constraint | ||
ALTER TABLE IF EXISTS qgep_od.bathing_area DROP CONSTRAINT rel_bathing_area_chute; | ||
|
||
-- 5. delete wrong fk_chute column | ||
ALTER TABLE IF EXISTS qgep_od.bathing_area DROP COLUMN fk_chute; | ||
|
||
-- 6. rename wrong value in qgep_sys.dictionary_od_field | ||
-- not needed as fk_attributes are not in qgep_sys tables | ||
|
||
|
||
|
||
-- class sector_water_body | ||
--1. add correct fk_surface_water_bodies | ||
ALTER TABLE IF EXISTS qgep_od.sector_water_body ADD COLUMN fk_surface_water_bodies varchar (16); | ||
|
||
-- 2. add correct CONSTRAINT | ||
-- ALTER TABLE qgep_od.sector_water_body ADD CONSTRAINT rel_sector_water_body_chute FOREIGN KEY (fk_chute) REFERENCES qgep_od.surface_water_bodies(obj_id) ON UPDATE CASCADE ON DELETE set null; | ||
|
||
ALTER TABLE IF EXISTS qgep_od.sector_water_body ADD CONSTRAINT rel_sector_water_body_surface_water_bodies FOREIGN KEY (fk_surface_water_bodies) REFERENCES qgep_od.surface_water_bodies(obj_id) ON UPDATE CASCADE ON DELETE set null; | ||
|
||
--3. copy data from fk_chute to fk_surface_water_bodies | ||
UPDATE qgep_od.sector_water_body | ||
SET fk_surface_water_bodies = fk_chute; | ||
|
||
-- 4. delete old rel_water_catchment_chute constraint | ||
ALTER TABLE IF EXISTS qgep_od.sector_water_body DROP CONSTRAINT rel_sector_water_body_chute; | ||
|
||
-- 5. delete wrong fk_chute column | ||
ALTER TABLE IF EXISTS qgep_od.sector_water_body DROP COLUMN fk_chute; | ||
|
||
-- 6. rename wrong value in qgep_sys.dictionary_od_field | ||
-- not needed as fk_attributes are not in qgep_sys tables | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.