41 lines
2.4 KiB
Plaintext
Executable File
41 lines
2.4 KiB
Plaintext
Executable File
-- $Id$
|
|
-- $HeadURL$
|
|
-- $Author$
|
|
|
|
-------------------------------------------------------------------------
|
|
-- INFO: Entry None for table aes_weather_source
|
|
-- PROJECT: Guez
|
|
-- DATE: 2024-05-17
|
|
-- VERSION: 2.90
|
|
-------------------------------------------------------------------------
|
|
|
|
-- GLOBAL: NONE;
|
|
BEGIN;
|
|
|
|
COMMIT;
|
|
|
|
-- EXERCISE: ALL;
|
|
BEGIN;
|
|
|
|
DELETE FROM aes_weather_source WHERE id = 3;
|
|
ALTER TABLE IF EXISTS aes_b_c_contamination DROP CONSTRAINT IF EXISTS FK_aes_b_c_contamination_weather_source_id_aes_weather_source_i CASCADE;
|
|
DROP VIEW aes_n_contamination_view;
|
|
ALTER TABLE aes_n_contamination DROP IF EXISTS weather_source_id ;
|
|
ALTER TABLE rec_n_contamination DROP IF EXISTS weather_source ;
|
|
|
|
-- aes_weather_source
|
|
INSERT INTO aes_weather_source (id, name) VALUES (3, 'AwsNone');
|
|
|
|
-- n_contamination
|
|
ALTER TABLE aes_n_contamination ADD weather_source_id integer;
|
|
ALTER TABLE rec_n_contamination ADD weather_source integer;
|
|
ALTER TABLE aes_n_contamination ADD CONSTRAINT FK_aes_n_contamination_weather_source_id_aes_weather_source_id FOREIGN KEY (weather_source_id) REFERENCES aes_weather_source (id) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
|
|
|
|
CREATE OR REPLACE VIEW aes_n_contamination_view AS SELECT aes_entity.id AS id, aes_entity.charge_type_id AS charge_type_id, aes_entity.effect_state_id AS effect_state_id, aes_entity.party_id AS party_id, aes_entity.participant_id AS participant_id, aes_entity.effect_duration AS effect_duration, aes_entity.effect_start AS effect_start, aes_entity.name AS name, aes_entity.effect_marking_in_ta AS effect_marking_in_ta, aes_entity.external_id AS external_id, aes_entity.is_central AS is_central, aes_entity.associated_aes_id AS associated_aes_id, aes_n_contamination.entity_id AS entity_id, aes_n_contamination.impact_position_x AS impact_position_x, aes_n_contamination.impact_position_y AS impact_position_y, aes_n_contamination.border_length_inner AS border_length_inner, aes_n_contamination.border_length_outer AS border_length_outer, aes_n_contamination.impact_radius AS impact_radius, aes_n_contamination.span_angle AS span_angle, aes_n_contamination.rotation_angle AS rotation_angle, aes_n_contamination.detonation_value AS detonation_value, aes_n_contamination.weather_source_id AS weather_source_id, aes_n_contamination.id AS aes_n_contamination_id
|
|
FROM aes_n_contamination, aes_entity
|
|
WHERE aes_entity.id = aes_n_contamination.entity_id;
|
|
|
|
|
|
COMMIT;
|