Mercurial > dive4elements > river
changeset 6652:765944ca6df0 double-precision
Purge tables when droping in Oracle to free space and avoid duplicates in views such as dba_constraints
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 24 Jul 2013 18:41:22 +0200 |
parents | 8782ba5cb222 |
children | 89f856e24d27 |
files | backend/doc/schema/oracle-drop-minfo.sql backend/doc/schema/oracle-drop-spatial.sql backend/doc/schema/oracle-drop.sql |
diffstat | 3 files changed, 79 insertions(+), 79 deletions(-) [+] |
line wrap: on
line diff
--- a/backend/doc/schema/oracle-drop-minfo.sql Wed Jul 24 18:39:42 2013 +0200 +++ b/backend/doc/schema/oracle-drop-minfo.sql Wed Jul 24 18:41:22 2013 +0200 @@ -36,29 +36,29 @@ ALTER TABLE measurement_station DROP CONSTRAINT fk_ms_reference_gauge_id; ALTER TABLE measurement_station DROP CONSTRAINT fk_ms_observation_timerange_id; -DROP TABLE bed_height_type; -DROP TABLE location_system; -DROP TABLE elevation_model; -DROP TABLE bed_height_single; -DROP TABLE bed_height_single_values; -DROP TABLE bed_height_epoch_values; -DROP TABLE bed_height_epoch; -DROP TABLE depths; -DROP TABLE sediment_density; -DROP TABLE sediment_density_values; -DROP TABLE morphologic_width; -DROP TABLE morphologic_width_values; -DROP TABLE discharge_zone; -DROP TABLE flow_velocity_model; -DROP TABLE flow_velocity_model_values; -DROP TABLE flow_velocity_measurements; -DROP TABLE flow_velocity_measure_values; -DROP TABLE grain_fraction; -DROP TABLE sediment_yield; -DROP TABLE sediment_yield_values; -DROP TABLE measurement_station; -DROP TABLE sq_relation_value; -DROP TABLE sq_relation; +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_epoch_values PURGE; +DROP TABLE bed_height_epoch PURGE; +DROP TABLE depths PURGE; +DROP TABLE sediment_density PURGE; +DROP TABLE sediment_density_values PURGE; +DROP TABLE morphologic_width PURGE; +DROP TABLE morphologic_width_values PURGE; +DROP TABLE discharge_zone PURGE; +DROP TABLE flow_velocity_model PURGE; +DROP TABLE flow_velocity_model_values PURGE; +DROP TABLE flow_velocity_measurements PURGE; +DROP TABLE flow_velocity_measure_values PURGE; +DROP TABLE grain_fraction PURGE; +DROP TABLE sediment_yield PURGE; +DROP TABLE sediment_yield_values PURGE; +DROP TABLE measurement_station PURGE; +DROP TABLE sq_relation_value PURGE; +DROP TABLE sq_relation PURGE; DROP SEQUENCE LOCATION_SYSTEM_SEQ; DROP SEQUENCE ELEVATION_MODEL_SEQ;
--- a/backend/doc/schema/oracle-drop-spatial.sql Wed Jul 24 18:39:42 2013 +0200 +++ b/backend/doc/schema/oracle-drop-spatial.sql Wed Jul 24 18:41:22 2013 +0200 @@ -1,85 +1,85 @@ DROP TRIGGER river_axes_trigger; -DROP TABLE river_axes; +DROP TABLE river_axes PURGE; DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'RIVER_AXES'; DROP SEQUENCE RIVER_AXES_ID_SEQ; DROP TRIGGER river_axes_km_trigger; -DROP TABLE river_axes_km; +DROP TABLE river_axes_km PURGE; DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'RIVER_AXES_KM'; DROP SEQUENCE RIVER_AXES_KM_ID_SEQ; DROP TRIGGER cross_section_tracks_trigger; -DROP TABLE cross_section_tracks; +DROP TABLE cross_section_tracks PURGE; DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'CROSS_SECTION_TRACKS'; DROP SEQUENCE CROSS_SECTION_TRACKS_ID_SEQ; DROP TRIGGER buildings_trigger; -DROP TABLE buildings; +DROP TABLE buildings PURGE; DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'BUILDINGS'; DROP SEQUENCE BUILDINGS_ID_SEQ; DROP TRIGGER fixpoints_trigger; -DROP TABLE fixpoints; +DROP TABLE fixpoints PURGE; DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'FIXPOINTS'; DROP SEQUENCE FIXPOINTS_ID_SEQ; DROP TRIGGER floodplain_trigger; -DROP TABLE floodplain; +DROP TABLE floodplain PURGE; DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'FLOODPLAIN'; DROP SEQUENCE FLOODPLAIN_ID_SEQ; DROP TRIGGER dem_trigger; -DROP TABLE dem; +DROP TABLE dem PURGE; DROP SEQUENCE DEM_ID_SEQ; DROP TRIGGER hws_lines_trigger; -DROP TABLE hws_lines; +DROP TABLE hws_lines PURGE; DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'HWS_LINES'; DROP SEQUENCE HWS_LINES_ID_SEQ; DROP TRIGGER hws_points_trigger; -DROP TABLE hws_points; +DROP TABLE hws_points PURGE; DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'HWS_POINTS'; DROP SEQUENCE HWS_POINTS_ID_SEQ; DROP TRIGGER floodmaps_trigger; -DROP TABLE floodmaps; +DROP TABLE floodmaps PURGE; DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'FLOODMAPS'; DROP SEQUENCE FLOODMAPS_ID_SEQ; DROP TRIGGER hydr_boundaries_trigger; -DROP TABLE hydr_boundaries; +DROP TABLE hydr_boundaries PURGE; DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'HYDR_BOUNDARIES'; DROP SEQUENCE HYDR_BOUNDARIES_ID_SEQ; DROP TRIGGER hydr_boundaries_poly_trigger; -DROP TABLE hydr_boundaries_poly; +DROP TABLE hydr_boundaries_poly PURGE; DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'HYDR_BOUNDARIES_POLY'; DROP SEQUENCE HYDR_BOUNDARIES_POLY_ID_SEQ; DROP TRIGGER gauge_location_trigger; -DROP TABLE gauge_location; +DROP TABLE gauge_location PURGE; DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'GAUGE_LOCATION'; DROP SEQUENCE GAUGE_LOCATION_ID_SEQ; DROP TRIGGER jetties_trigger; -DROP TABLE jetties; +DROP TABLE jetties PURGE; DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'JETTIES'; DROP SEQUENCE JETTIES_ID_SEQ; DROP TRIGGER flood_marks_trigger; -DROP TABLE flood_marks; +DROP TABLE flood_marks PURGE; DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'FLOOD_MARKS'; DROP SEQUENCE FLOOD_MARKS_ID_SEQ; -DROP TABLE hws_kinds; -DROP TABLE sectie_kinds; -DROP TABLE sobek_kinds; -DROP TABLE fed_states; -DROP TABLE axis_kinds; -DROP TABLE boundary_kinds; -DROP TABLE cross_section_track_kinds; -DROP TABLE floodplain_kinds; -DROP TABLE floodmap_kinds; -DROP TABLE building_kinds; -DROP TABLE jetty_kinds; +DROP TABLE hws_kinds PURGE; +DROP TABLE sectie_kinds PURGE; +DROP TABLE sobek_kinds PURGE; +DROP TABLE fed_states PURGE; +DROP TABLE axis_kinds PURGE; +DROP TABLE boundary_kinds PURGE; +DROP TABLE cross_section_track_kinds PURGE; +DROP TABLE floodplain_kinds PURGE; +DROP TABLE floodmap_kinds PURGE; +DROP TABLE building_kinds PURGE; +DROP TABLE jetty_kinds PURGE;
--- a/backend/doc/schema/oracle-drop.sql Wed Jul 24 18:39:42 2013 +0200 +++ b/backend/doc/schema/oracle-drop.sql Wed Jul 24 18:41:22 2013 +0200 @@ -32,36 +32,36 @@ ALTER TABLE wst_q_ranges DROP CONSTRAINT cWstQRangesRanges; ALTER TABLE wsts DROP CONSTRAINT cWstsRivers; ALTER TABLE wsts DROP CONSTRAINT cWstsWstKinds; -DROP TABLE annotation_types; -DROP TABLE annotations; -DROP TABLE attributes; -DROP TABLE cross_section_lines; -DROP TABLE cross_section_points; -DROP TABLE cross_sections; -DROP TABLE discharge_table_values; -DROP TABLE discharge_tables; -DROP TABLE edges; -DROP TABLE gauges; -DROP TABLE hyk_entries; -DROP TABLE hyk_flow_zone_types; -DROP TABLE hyk_flow_zones; -DROP TABLE hyk_formations; -DROP TABLE hyks; -DROP TABLE main_value_types; -DROP TABLE main_values; -DROP TABLE named_main_values; -DROP TABLE positions; -DROP TABLE ranges; -DROP TABLE rivers; -DROP TABLE time_intervals; -DROP TABLE units; -DROP TABLE wst_column_q_ranges; -DROP TABLE wst_column_values; -DROP TABLE wst_columns; -DROP TABLE wst_q_ranges; -DROP TABLE official_lines; -DROP TABLE wsts; -DROP TABLE wst_kinds; +DROP TABLE annotation_types PURGE; +DROP TABLE annotations PURGE; +DROP TABLE attributes PURGE; +DROP TABLE cross_section_lines PURGE; +DROP TABLE cross_section_points PURGE; +DROP TABLE cross_sections PURGE; +DROP TABLE discharge_table_values PURGE; +DROP TABLE discharge_tables PURGE; +DROP TABLE edges PURGE; +DROP TABLE gauges PURGE; +DROP TABLE hyk_entries PURGE; +DROP TABLE hyk_flow_zone_types PURGE; +DROP TABLE hyk_flow_zones PURGE; +DROP TABLE hyk_formations PURGE; +DROP TABLE hyks PURGE; +DROP TABLE main_value_types PURGE; +DROP TABLE main_values PURGE; +DROP TABLE named_main_values PURGE; +DROP TABLE positions PURGE; +DROP TABLE ranges PURGE; +DROP TABLE rivers PURGE; +DROP TABLE time_intervals PURGE; +DROP TABLE units PURGE; +DROP TABLE wst_column_q_ranges PURGE; +DROP TABLE wst_column_values PURGE; +DROP TABLE wst_columns PURGE; +DROP TABLE wst_q_ranges PURGE; +DROP TABLE official_lines PURGE; +DROP TABLE wsts PURGE; +DROP TABLE wst_kinds PURGE; DROP SEQUENCE ANNOTATION_TYPES_ID_SEQ; DROP SEQUENCE ANNOTATIONS_ID_SEQ; DROP SEQUENCE ATTRIBUTES_ID_SEQ;