view backend/doc/schema/oracle-drop-minfo.sql @ 8561:2b3c8ea6cbee

Accept more elevation system names (e.g. with hyphen).
author "Tom Gottfried <tom@intevation.de>"
date Mon, 16 Feb 2015 12:12:12 +0100
parents a846a3d910a0
children 1a4ad0d4231a
line wrap: on
line source
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 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;
ALTER TABLE morphologic_width DROP CONSTRAINT fk_mw_unit_id;
ALTER TABLE morphologic_width_values DROP CONSTRAINT fk_mwv_morphologic_width_id;
ALTER TABLE flow_velocity_model_values DROP CONSTRAINT fk_fvv_flow_velocity_model_id;
ALTER TABLE flow_velocity_model DROP CONSTRAINT fk_fvm_discharge_zone_id;
ALTER TABLE discharge_zone DROP CONSTRAINT fk_dz_river_id;
ALTER TABLE flow_velocity_measurements DROP CONSTRAINT fk_fvm_rivers_id;
ALTER TABLE flow_velocity_measure_values DROP CONSTRAINT fk_fvmv_measurements_id;
ALTER TABLE sediment_load_ls DROP CONSTRAINT fk_slls_grain_fraction_id;
ALTER TABLE sediment_load_ls DROP CONSTRAINT fk_slls_unit_id;
ALTER TABLE sediment_load_ls DROP CONSTRAINT fk_slls_time_interval_id;
ALTER TABLE sediment_load_ls DROP CONSTRAINT fk_slls_river_id;
ALTER TABLE sediment_load_ls_values DROP CONSTRAINT fk_sllsv_sediment_load_ls_id;
ALTER TABLE sediment_load DROP CONSTRAINT fk_sl_kind_id;
ALTER TABLE sediment_load DROP CONSTRAINT fk_sl_grain_fraction_id;
ALTER TABLE sediment_load DROP CONSTRAINT fk_sl_time_interval_id;
ALTER TABLE sediment_load DROP CONSTRAINT fk_sl_sq_time_interval_id;
ALTER TABLE sediment_load_values DROP CONSTRAINT fk_slv_sediment_load_id;
ALTER TABLE sediment_load_values DROP CONSTRAINT fk_slv_m_station_id;
ALTER TABLE sq_relation DROP CONSTRAINT fk_sqr_tinterval_id;
ALTER TABLE sq_relation DROP CONSTRAINT fk_sqr_river_id;
ALTER TABLE sq_relation_value DROP CONSTRAINT fk_sqr_id;
ALTER TABLE sq_relation_value DROP CONSTRAINT fk_mstation_id;
ALTER TABLE measurement_station DROP CONSTRAINT fk_ms_river_id;
ALTER TABLE measurement_station DROP CONSTRAINT fk_ms_range_id;
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 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 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_load_ls PURGE;
DROP TABLE sediment_load_ls_values PURGE;
DROP TABLE sediment_load PURGE;
DROP TABLE sediment_load_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;
DROP SEQUENCE BED_HEIGHT_SINGLE_ID_SEQ;
DROP SEQUENCE BED_SINGLE_VALUES_ID_SEQ;
DROP SEQUENCE DEPTHS_ID_SEQ;
DROP SEQUENCE SEDIMENT_DENSITY_ID_SEQ;
DROP SEQUENCE SEDIMENT_DENSITY_VALUES_ID_SEQ;
DROP SEQUENCE MORPHOLOGIC_WIDTH_ID_SEQ;
DROP SEQUENCE MORPH_WIDTH_VALUES_ID_SEQ;
DROP SEQUENCE DISCHARGE_ZONE_ID_SEQ;
DROP SEQUENCE FLOW_VELOCITY_MODEL_ID_SEQ;
DROP SEQUENCE FLOW_VELOCITY_M_VALUES_ID_SEQ;
DROP SEQUENCE FV_MEASURE_ID_SEQ;
DROP SEQUENCE FV_MEASURE_VALUES_ID_SEQ;
DROP SEQUENCE GRAIN_FRACTION_ID_SEQ;
DROP SEQUENCE SEDIMENT_LOAD_LS_ID_SEQ;
DROP SEQUENCE SEDIMENT_LOAD_LS_VALUES_ID_SEQ;
DROP SEQUENCE SEDIMENT_LOAD_ID_SEQ;
DROP SEQUENCE SEDIMENT_LOAD_VALUES_ID_SEQ;
DROP SEQUENCE MEASUREMENT_STATION_ID_SEQ;
DROP SEQUENCE SQ_RELATION_ID_SEQ;
DROP SEQUENCE SQ_RELATION_VALUES_ID_SEQ;

http://dive4elements.wald.intevation.org