-- # $Id$ -- # $HeadURL$ -- # $Author$ INSERT INTO exm.exercise (id, name, exercise_state_id, training_area_id, active_phase_id, begin_time, end_time, created) -- as there is no radio group in ex 35, we have to skip the column here VALUES(35, 'Test Exercise 35', -- name 5, -- STOPPED, then transferred = true, otherwise OC Tablet does not start properly 6, -- TrainingArea 6: Bremen -- no radio group 1, -- active phase extract(epoch from (now() at time zone 'utc')::timestamp(0)) * 1000, -- today in miliseconds extract(epoch from (now() at time zone 'utc')::timestamp(0) + interval '30 days' ) * 1000, -- today + 30 days in miliseconds extract(epoch from (now() at time zone 'utc')::timestamp(0)) * 1000 -- today in miliseconds ); INSERT INTO exm.exercise (id, name, exercise_state_id, training_area_id, radio_group_id, active_phase_id, begin_time, end_time, created, start_time) VALUES(42, 'Test Exercise 42', -- name 2, -- STARTED 6, -- TrainingArea 6: Bremen 2, -- radio group 2 2, -- active phase extract(epoch from (now() at time zone 'utc')::timestamp(0)) * 1000, -- today in miliseconds extract(epoch from (now() at time zone 'utc')::timestamp(0) + interval '30 days' ) * 1000, -- today + 30 days in miliseconds extract(epoch from (now() at time zone 'utc')::timestamp(0)) * 1000, -- today in miliseconds extract(epoch from (now() at time zone 'utc')::timestamp(0)) * 1000 -- today in miliseconds ); INSERT INTO exm.exercise_phase (id, name, description, begin_time, end_time, exercise_id) VALUES(1, 'Test phase 1 (exercise 35)', -- name 'Test phase for exercise 35', -- description extract(epoch from (now() at time zone 'utc')::timestamp(0)) * 1000, -- today in miliseconds extract(epoch from (now() at time zone 'utc')::timestamp(0) + interval '30 days' ) * 1000, -- today + 30 days in miliseconds 35 -- Exercise 35 ); INSERT INTO exm.exercise_phase (id, name, description, begin_time, end_time, exercise_id) VALUES(2, 'Test phase 1 (exercise 42)', -- name 'Test phase for exercise 42', -- description extract(epoch from (now() at time zone 'utc')::timestamp(0)) * 1000, -- today in miliseconds extract(epoch from (now() at time zone 'utc')::timestamp(0) + interval '30 days' ) * 1000, -- today + 30 days in miliseconds 42 -- Exercise 42 ); -- get hexdump of exercise imgae: 'cat 42.png | xxd -p' INSERT INTO exm.exercise_image (exercise_id, image) VALUES(42, decode(' 89504e470d0a1a0a0000000d49484452000000090000000608020000009e a52392000000097048597300000b1300000b1301009a9c18000000384944 415408d76dcbbb0d003008434147f21a78ffb93c490a04ca87d7b8e05811 611b8024db92501177e9923207533ce1e3f8f3d6c3ad5f37f47a102104d2 89500000000049454e44ae426082 ', 'hex') ); ALTER SEQUENCE exm.exercise_id_seq RESTART WITH 101; ALTER SEQUENCE exm.exercise_phase_id_seq RESTART WITH 3; UPDATE exm.exercise SET send_to_wms = true; UPDATE exm.exercise SET transferred = true WHERE id = 35;