annotate backend/doc/schema/oracle-drop-minfo.sql @ 9803:a440ebd5c23b 3.2.x tip

Avoid using outdated mod_wsgi in Docker setup Run Wiki in standalone mode behind reverse proxy, which is provided by a more up-to-date Apache web server. The wiki container is still based on CentOS 7, because the included SSO integration component cannot be build with more recent libraries.
author Tom Gottfried <tom@intevation.de>
date Wed, 21 Aug 2024 16:54:17 +0200
parents 1a4ad0d4231a
children
rev   line source
2805
a55b7b35cc3a First things for MINFO specific database schema.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 SET AUTOCOMMIT ON;
a55b7b35cc3a First things for MINFO specific database schema.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2
a55b7b35cc3a First things for MINFO specific database schema.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
3 ALTER TABLE elevation_model DROP CONSTRAINT fk_unit;
8666
1a4ad0d4231a (issue1763) Use more distinct constraint names and adapt drop-script.
Tom Gottfried <tom@intevation.de>
parents: 8471
diff changeset
4 ALTER TABLE bed_height DROP CONSTRAINT fk_bh_river_id;
1a4ad0d4231a (issue1763) Use more distinct constraint names and adapt drop-script.
Tom Gottfried <tom@intevation.de>
parents: 8471
diff changeset
5 ALTER TABLE bed_height DROP CONSTRAINT fk_bh_type;
1a4ad0d4231a (issue1763) Use more distinct constraint names and adapt drop-script.
Tom Gottfried <tom@intevation.de>
parents: 8471
diff changeset
6 ALTER TABLE bed_height DROP CONSTRAINT fk_bh_location_system;
1a4ad0d4231a (issue1763) Use more distinct constraint names and adapt drop-script.
Tom Gottfried <tom@intevation.de>
parents: 8471
diff changeset
7 ALTER TABLE bed_height DROP CONSTRAINT fk_bh_cur_elevation_model;
1a4ad0d4231a (issue1763) Use more distinct constraint names and adapt drop-script.
Tom Gottfried <tom@intevation.de>
parents: 8471
diff changeset
8 ALTER TABLE bed_height DROP CONSTRAINT fk_bh_old_elevation_model;
1a4ad0d4231a (issue1763) Use more distinct constraint names and adapt drop-script.
Tom Gottfried <tom@intevation.de>
parents: 8471
diff changeset
9 ALTER TABLE bed_height DROP CONSTRAINT fk_bh_range;
1a4ad0d4231a (issue1763) Use more distinct constraint names and adapt drop-script.
Tom Gottfried <tom@intevation.de>
parents: 8471
diff changeset
10 ALTER TABLE bed_height_values DROP CONSTRAINT fk_bed_values_parent;
2812
a36a5407acbf Improved the MINFO db schema and added model classes for storing sediment density values specific to a river and depth.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2809
diff changeset
11 ALTER TABLE sediment_density DROP CONSTRAINT fk_sd_depth_id;
a36a5407acbf Improved the MINFO db schema and added model classes for storing sediment density values specific to a river and depth.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2809
diff changeset
12 ALTER TABLE sediment_density_values DROP CONSTRAINT fk_sdv_sediment_density_id;
2818
25ed1f18fcc4 Improved the MIFNO DB schema for morphological width and added model classes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2816
diff changeset
13 ALTER TABLE morphologic_width DROP CONSTRAINT fk_mw_river_id;
25ed1f18fcc4 Improved the MIFNO DB schema for morphological width and added model classes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2816
diff changeset
14 ALTER TABLE morphologic_width DROP CONSTRAINT fk_mw_unit_id;
25ed1f18fcc4 Improved the MIFNO DB schema for morphological width and added model classes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2816
diff changeset
15 ALTER TABLE morphologic_width_values DROP CONSTRAINT fk_mwv_morphologic_width_id;
2824
85b2b5e7377f Improved the oracle db schema for MINFO specific flow velocity values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2818
diff changeset
16 ALTER TABLE flow_velocity_model_values DROP CONSTRAINT fk_fvv_flow_velocity_model_id;
85b2b5e7377f Improved the oracle db schema for MINFO specific flow velocity values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2818
diff changeset
17 ALTER TABLE flow_velocity_model DROP CONSTRAINT fk_fvm_discharge_zone_id;
85b2b5e7377f Improved the oracle db schema for MINFO specific flow velocity values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2818
diff changeset
18 ALTER TABLE discharge_zone DROP CONSTRAINT fk_dz_river_id;
2829
4074777afcfa Added MINFO specific relations for flow velocity measurements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2824
diff changeset
19 ALTER TABLE flow_velocity_measurements DROP CONSTRAINT fk_fvm_rivers_id;
4074777afcfa Added MINFO specific relations for flow velocity measurements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2824
diff changeset
20 ALTER TABLE flow_velocity_measure_values DROP CONSTRAINT fk_fvmv_measurements_id;
8072
5f28aa1be795 SCHEMA CHANGE: rename database tables from yield to load_ls according to respective classes.
Tom Gottfried <tom@intevation.de>
parents: 8018
diff changeset
21 ALTER TABLE sediment_load_ls DROP CONSTRAINT fk_slls_grain_fraction_id;
5f28aa1be795 SCHEMA CHANGE: rename database tables from yield to load_ls according to respective classes.
Tom Gottfried <tom@intevation.de>
parents: 8018
diff changeset
22 ALTER TABLE sediment_load_ls DROP CONSTRAINT fk_slls_unit_id;
5f28aa1be795 SCHEMA CHANGE: rename database tables from yield to load_ls according to respective classes.
Tom Gottfried <tom@intevation.de>
parents: 8018
diff changeset
23 ALTER TABLE sediment_load_ls DROP CONSTRAINT fk_slls_time_interval_id;
5f28aa1be795 SCHEMA CHANGE: rename database tables from yield to load_ls according to respective classes.
Tom Gottfried <tom@intevation.de>
parents: 8018
diff changeset
24 ALTER TABLE sediment_load_ls DROP CONSTRAINT fk_slls_river_id;
5f28aa1be795 SCHEMA CHANGE: rename database tables from yield to load_ls according to respective classes.
Tom Gottfried <tom@intevation.de>
parents: 8018
diff changeset
25 ALTER TABLE sediment_load_ls_values DROP CONSTRAINT fk_sllsv_sediment_load_ls_id;
8018
ad614eff7a9b SCHEMA CHANGE: consistent naming scheme and drop script for sediment load at measurement stations.
Tom Gottfried <tom@intevation.de>
parents: 6652
diff changeset
26 ALTER TABLE sediment_load DROP CONSTRAINT fk_sl_kind_id;
ad614eff7a9b SCHEMA CHANGE: consistent naming scheme and drop script for sediment load at measurement stations.
Tom Gottfried <tom@intevation.de>
parents: 6652
diff changeset
27 ALTER TABLE sediment_load DROP CONSTRAINT fk_sl_grain_fraction_id;
ad614eff7a9b SCHEMA CHANGE: consistent naming scheme and drop script for sediment load at measurement stations.
Tom Gottfried <tom@intevation.de>
parents: 6652
diff changeset
28 ALTER TABLE sediment_load DROP CONSTRAINT fk_sl_time_interval_id;
ad614eff7a9b SCHEMA CHANGE: consistent naming scheme and drop script for sediment load at measurement stations.
Tom Gottfried <tom@intevation.de>
parents: 6652
diff changeset
29 ALTER TABLE sediment_load DROP CONSTRAINT fk_sl_sq_time_interval_id;
ad614eff7a9b SCHEMA CHANGE: consistent naming scheme and drop script for sediment load at measurement stations.
Tom Gottfried <tom@intevation.de>
parents: 6652
diff changeset
30 ALTER TABLE sediment_load_values DROP CONSTRAINT fk_slv_sediment_load_id;
ad614eff7a9b SCHEMA CHANGE: consistent naming scheme and drop script for sediment load at measurement stations.
Tom Gottfried <tom@intevation.de>
parents: 6652
diff changeset
31 ALTER TABLE sediment_load_values DROP CONSTRAINT fk_slv_m_station_id;
3321
a2a33eff93aa Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2849
diff changeset
32 ALTER TABLE sq_relation DROP CONSTRAINT fk_sqr_tinterval_id;
3329
cc8fc6b29649 Store sq relations into database after parsing.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3321
diff changeset
33 ALTER TABLE sq_relation DROP CONSTRAINT fk_sqr_river_id;
3321
a2a33eff93aa Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2849
diff changeset
34 ALTER TABLE sq_relation_value DROP CONSTRAINT fk_sqr_id;
5406
e88d55d01cf5 SCHEMA CHANGE: additional columns and FK constraint for SQ-relation
Tom Gottfried <tom@intevation.de>
parents: 5321
diff changeset
35 ALTER TABLE sq_relation_value DROP CONSTRAINT fk_mstation_id;
5206
8667f629d238 SCHEME CHANGE: Add measurement_station to oracle table and rename comment column
Andre Heinecke <aheinecke@intevation.de>
parents: 3329
diff changeset
36 ALTER TABLE measurement_station DROP CONSTRAINT fk_ms_river_id;
8667f629d238 SCHEME CHANGE: Add measurement_station to oracle table and rename comment column
Andre Heinecke <aheinecke@intevation.de>
parents: 3329
diff changeset
37 ALTER TABLE measurement_station DROP CONSTRAINT fk_ms_range_id;
8667f629d238 SCHEME CHANGE: Add measurement_station to oracle table and rename comment column
Andre Heinecke <aheinecke@intevation.de>
parents: 3329
diff changeset
38 ALTER TABLE measurement_station DROP CONSTRAINT fk_ms_reference_gauge_id;
8667f629d238 SCHEME CHANGE: Add measurement_station to oracle table and rename comment column
Andre Heinecke <aheinecke@intevation.de>
parents: 3329
diff changeset
39 ALTER TABLE measurement_station DROP CONSTRAINT fk_ms_observation_timerange_id;
2805
a55b7b35cc3a First things for MINFO specific database schema.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
40
6652
765944ca6df0 Purge tables when droping in Oracle to free space and avoid duplicates in views such as dba_constraints
Tom Gottfried <tom@intevation.de>
parents: 6632
diff changeset
41 DROP TABLE bed_height_type PURGE;
765944ca6df0 Purge tables when droping in Oracle to free space and avoid duplicates in views such as dba_constraints
Tom Gottfried <tom@intevation.de>
parents: 6632
diff changeset
42 DROP TABLE location_system PURGE;
765944ca6df0 Purge tables when droping in Oracle to free space and avoid duplicates in views such as dba_constraints
Tom Gottfried <tom@intevation.de>
parents: 6632
diff changeset
43 DROP TABLE elevation_model PURGE;
8666
1a4ad0d4231a (issue1763) Use more distinct constraint names and adapt drop-script.
Tom Gottfried <tom@intevation.de>
parents: 8471
diff changeset
44 DROP TABLE bed_height PURGE;
1a4ad0d4231a (issue1763) Use more distinct constraint names and adapt drop-script.
Tom Gottfried <tom@intevation.de>
parents: 8471
diff changeset
45 DROP TABLE bed_height_values PURGE;
6652
765944ca6df0 Purge tables when droping in Oracle to free space and avoid duplicates in views such as dba_constraints
Tom Gottfried <tom@intevation.de>
parents: 6632
diff changeset
46 DROP TABLE depths PURGE;
765944ca6df0 Purge tables when droping in Oracle to free space and avoid duplicates in views such as dba_constraints
Tom Gottfried <tom@intevation.de>
parents: 6632
diff changeset
47 DROP TABLE sediment_density PURGE;
765944ca6df0 Purge tables when droping in Oracle to free space and avoid duplicates in views such as dba_constraints
Tom Gottfried <tom@intevation.de>
parents: 6632
diff changeset
48 DROP TABLE sediment_density_values PURGE;
765944ca6df0 Purge tables when droping in Oracle to free space and avoid duplicates in views such as dba_constraints
Tom Gottfried <tom@intevation.de>
parents: 6632
diff changeset
49 DROP TABLE morphologic_width PURGE;
765944ca6df0 Purge tables when droping in Oracle to free space and avoid duplicates in views such as dba_constraints
Tom Gottfried <tom@intevation.de>
parents: 6632
diff changeset
50 DROP TABLE morphologic_width_values PURGE;
765944ca6df0 Purge tables when droping in Oracle to free space and avoid duplicates in views such as dba_constraints
Tom Gottfried <tom@intevation.de>
parents: 6632
diff changeset
51 DROP TABLE discharge_zone PURGE;
765944ca6df0 Purge tables when droping in Oracle to free space and avoid duplicates in views such as dba_constraints
Tom Gottfried <tom@intevation.de>
parents: 6632
diff changeset
52 DROP TABLE flow_velocity_model PURGE;
765944ca6df0 Purge tables when droping in Oracle to free space and avoid duplicates in views such as dba_constraints
Tom Gottfried <tom@intevation.de>
parents: 6632
diff changeset
53 DROP TABLE flow_velocity_model_values PURGE;
765944ca6df0 Purge tables when droping in Oracle to free space and avoid duplicates in views such as dba_constraints
Tom Gottfried <tom@intevation.de>
parents: 6632
diff changeset
54 DROP TABLE flow_velocity_measurements PURGE;
765944ca6df0 Purge tables when droping in Oracle to free space and avoid duplicates in views such as dba_constraints
Tom Gottfried <tom@intevation.de>
parents: 6632
diff changeset
55 DROP TABLE flow_velocity_measure_values PURGE;
765944ca6df0 Purge tables when droping in Oracle to free space and avoid duplicates in views such as dba_constraints
Tom Gottfried <tom@intevation.de>
parents: 6632
diff changeset
56 DROP TABLE grain_fraction PURGE;
8072
5f28aa1be795 SCHEMA CHANGE: rename database tables from yield to load_ls according to respective classes.
Tom Gottfried <tom@intevation.de>
parents: 8018
diff changeset
57 DROP TABLE sediment_load_ls PURGE;
5f28aa1be795 SCHEMA CHANGE: rename database tables from yield to load_ls according to respective classes.
Tom Gottfried <tom@intevation.de>
parents: 8018
diff changeset
58 DROP TABLE sediment_load_ls_values PURGE;
8018
ad614eff7a9b SCHEMA CHANGE: consistent naming scheme and drop script for sediment load at measurement stations.
Tom Gottfried <tom@intevation.de>
parents: 6652
diff changeset
59 DROP TABLE sediment_load PURGE;
ad614eff7a9b SCHEMA CHANGE: consistent naming scheme and drop script for sediment load at measurement stations.
Tom Gottfried <tom@intevation.de>
parents: 6652
diff changeset
60 DROP TABLE sediment_load_values PURGE;
6652
765944ca6df0 Purge tables when droping in Oracle to free space and avoid duplicates in views such as dba_constraints
Tom Gottfried <tom@intevation.de>
parents: 6632
diff changeset
61 DROP TABLE measurement_station PURGE;
765944ca6df0 Purge tables when droping in Oracle to free space and avoid duplicates in views such as dba_constraints
Tom Gottfried <tom@intevation.de>
parents: 6632
diff changeset
62 DROP TABLE sq_relation_value PURGE;
765944ca6df0 Purge tables when droping in Oracle to free space and avoid duplicates in views such as dba_constraints
Tom Gottfried <tom@intevation.de>
parents: 6632
diff changeset
63 DROP TABLE sq_relation PURGE;
2805
a55b7b35cc3a First things for MINFO specific database schema.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
64
a55b7b35cc3a First things for MINFO specific database schema.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
65 DROP SEQUENCE LOCATION_SYSTEM_SEQ;
a55b7b35cc3a First things for MINFO specific database schema.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
66 DROP SEQUENCE ELEVATION_MODEL_SEQ;
8666
1a4ad0d4231a (issue1763) Use more distinct constraint names and adapt drop-script.
Tom Gottfried <tom@intevation.de>
parents: 8471
diff changeset
67 DROP SEQUENCE BED_HEIGHT_ID_SEQ;
1a4ad0d4231a (issue1763) Use more distinct constraint names and adapt drop-script.
Tom Gottfried <tom@intevation.de>
parents: 8471
diff changeset
68 DROP SEQUENCE BED_HEIGHT_VALUES_ID_SEQ;
2812
a36a5407acbf Improved the MINFO db schema and added model classes for storing sediment density values specific to a river and depth.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2809
diff changeset
69 DROP SEQUENCE DEPTHS_ID_SEQ;
a36a5407acbf Improved the MINFO db schema and added model classes for storing sediment density values specific to a river and depth.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2809
diff changeset
70 DROP SEQUENCE SEDIMENT_DENSITY_ID_SEQ;
a36a5407acbf Improved the MINFO db schema and added model classes for storing sediment density values specific to a river and depth.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2809
diff changeset
71 DROP SEQUENCE SEDIMENT_DENSITY_VALUES_ID_SEQ;
2818
25ed1f18fcc4 Improved the MIFNO DB schema for morphological width and added model classes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2816
diff changeset
72 DROP SEQUENCE MORPHOLOGIC_WIDTH_ID_SEQ;
25ed1f18fcc4 Improved the MIFNO DB schema for morphological width and added model classes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2816
diff changeset
73 DROP SEQUENCE MORPH_WIDTH_VALUES_ID_SEQ;
2824
85b2b5e7377f Improved the oracle db schema for MINFO specific flow velocity values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2818
diff changeset
74 DROP SEQUENCE DISCHARGE_ZONE_ID_SEQ;
85b2b5e7377f Improved the oracle db schema for MINFO specific flow velocity values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2818
diff changeset
75 DROP SEQUENCE FLOW_VELOCITY_MODEL_ID_SEQ;
85b2b5e7377f Improved the oracle db schema for MINFO specific flow velocity values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2818
diff changeset
76 DROP SEQUENCE FLOW_VELOCITY_M_VALUES_ID_SEQ;
2829
4074777afcfa Added MINFO specific relations for flow velocity measurements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2824
diff changeset
77 DROP SEQUENCE FV_MEASURE_ID_SEQ;
4074777afcfa Added MINFO specific relations for flow velocity measurements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2824
diff changeset
78 DROP SEQUENCE FV_MEASURE_VALUES_ID_SEQ;
2834
daba3f895eb3 Improved the db schema to store sediment yield values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2833
diff changeset
79 DROP SEQUENCE GRAIN_FRACTION_ID_SEQ;
8072
5f28aa1be795 SCHEMA CHANGE: rename database tables from yield to load_ls according to respective classes.
Tom Gottfried <tom@intevation.de>
parents: 8018
diff changeset
80 DROP SEQUENCE SEDIMENT_LOAD_LS_ID_SEQ;
5f28aa1be795 SCHEMA CHANGE: rename database tables from yield to load_ls according to respective classes.
Tom Gottfried <tom@intevation.de>
parents: 8018
diff changeset
81 DROP SEQUENCE SEDIMENT_LOAD_LS_VALUES_ID_SEQ;
8018
ad614eff7a9b SCHEMA CHANGE: consistent naming scheme and drop script for sediment load at measurement stations.
Tom Gottfried <tom@intevation.de>
parents: 6652
diff changeset
82 DROP SEQUENCE SEDIMENT_LOAD_ID_SEQ;
ad614eff7a9b SCHEMA CHANGE: consistent naming scheme and drop script for sediment load at measurement stations.
Tom Gottfried <tom@intevation.de>
parents: 6652
diff changeset
83 DROP SEQUENCE SEDIMENT_LOAD_VALUES_ID_SEQ;
6632
97145ec4e33c Schema changes: fixed typos, syntax errors and missing or obsolete statements in Oracle schema
Tom Gottfried <tom@intevation.de>
parents: 5838
diff changeset
84 DROP SEQUENCE MEASUREMENT_STATION_ID_SEQ;
3321
a2a33eff93aa Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2849
diff changeset
85 DROP SEQUENCE SQ_RELATION_ID_SEQ;
a2a33eff93aa Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2849
diff changeset
86 DROP SEQUENCE SQ_RELATION_VALUES_ID_SEQ;

http://dive4elements.wald.intevation.org