Files
qt5-legatus-legacy/Lts/Services/AreaEffectSimulation/aes_predefined_data.sql
T
2026-08-13 18:33:10 +02:00

10 lines
851 B
SQL
Executable File

-- Generic technical areas for all exercises and all training areas (assuming 1 default technical area for each TA)
SET SEARCH_PATH TO ex_%ex_id%, PUBLIC;
INSERT INTO aes_entity (charge_type_id, effect_state_id, party_id, participant_id, effect_duration, effect_start, name) SELECT charge_type_id, 6, 0, 0, 0, 1, name FROM asm.asm_technical_area WHERE asm_technical_area.training_area_id = (SELECT training_area_id FROM exm.exercise WHERE id = %ex_id%);
INSERT INTO aes_technical_area (entity_id, type_id, position_x, position_y, width, length) SELECT lastval(), 2, position_x, position_y, width, length FROM asm.asm_technical_area WHERE asm_technical_area.training_area_id = (SELECT training_area_id FROM exm.exercise WHERE id = %ex_id%);
-- for each ADLER chargeType and each party one entry with 10000
-- (DONE in PPM since parties are needed)