Files
qt5-legatus-legacy/Lts/Tests/DatabaseInitialisation/insert_flm_values.sql
T
2026-08-13 18:33:10 +02:00

66 lines
6.7 KiB
SQL
Executable File

-- # $Id$
-- # $HeadURL$
-- # $Author$
INSERT INTO flm.flm_file_type_info (id, file_type_id, description, extension) VALUES (1, 1, 'Text Document', 'txt');
INSERT INTO flm.flm_file_type_info (id, file_type_id, description, extension) VALUES (2, 2, 'XML file', 'xml');
INSERT INTO flm.flm_file_type_info (id, file_type_id, description, extension) VALUES (3, 3, 'PDF Document', 'pdf');
INSERT INTO flm.flm_file_type_info (id, file_type_id, description, extension) VALUES (4, 4, 'JPG Image', 'jpg');
INSERT INTO flm.flm_file_type_info (id, file_type_id, description, extension) VALUES (5, 5, 'PNG Image', 'png');
INSERT INTO flm.flm_file_type_info (id, file_type_id, description, extension) VALUES (6, 6, 'Tactical Plan', 'pln');
INSERT INTO flm.flm_file_type_info (id, file_type_id, description, extension) VALUES (7, 7, 'Operator Favourite', 'fav');
INSERT INTO flm.flm_file_type_info (id, file_type_id, description, extension) VALUES (8, 8, 'Operator Defined Symbols', 'svg');
INSERT INTO flm.flm_file_type_info (id, file_type_id, description, extension) VALUES (9, 9, 'OpenOffice Document', 'odt');
INSERT INTO flm.flm_file_type_info (id, file_type_id, description, extension) VALUES (10, 10, 'OpenOffice Spreadsheet', 'ods');
INSERT INTO flm.flm_file_type_info (id, file_type_id, description, extension) VALUES (11, 11, 'OpenOffice Presentation', 'odp');
INSERT INTO flm.flm_file_type_info (id, file_type_id, description, extension) VALUES (12, 12, 'Microsoft Word Document', 'docx');
INSERT INTO flm.flm_file_type_info (id, file_type_id, description, extension) VALUES (13, 13, 'Microsoft Word 97-2003 Document', 'doc');
INSERT INTO flm.flm_file_type_info (id, file_type_id, description, extension) VALUES (14, 14, 'Microsoft Excel Worksheet', 'xlsx');
INSERT INTO flm.flm_file_type_info (id, file_type_id, description, extension) VALUES (15, 15, 'Microsoft Excel 97-2003 Worksheet', 'xls');
INSERT INTO flm.flm_file_type_info (id, file_type_id, description, extension) VALUES (16, 16, 'Microsoft Powerpoint Presentation', 'pptx');
INSERT INTO flm.flm_file_type_info (id, file_type_id, description, extension) VALUES (17, 17, 'Microsoft Powerpoint 97-2003 Presentation', 'ppt');
INSERT INTO flm.flm_file_type_info (id, file_type_id, description, extension) VALUES (18, 18, 'Evaluation Schema', 'evl');
ALTER SEQUENCE flm.flm_file_type_info_id_seq RESTART WITH 19;
INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (1, 'Global Documents', '{1}', false, 0, 99);
INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (2, 'Exercise Documents', '{2}', false, 0, 99);
INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (3, 'User Documents', '{3}', false, 0, 99);
-- old global documents structure
-- INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (4, 'Support Documents','{1,4}', true, 1, 99);
-- INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (5, 'Situation Framework','{1,5}', true, 1, 99);
-- INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (6, 'Tactical Plans','{1,6}', true, 1, 99);
-- INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (7, 'Plan Editor Favourites','{1,7}', true, 1, 99);
-- INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (8, 'Tactical Symbols','{1,8}', true, 1, 99);
-- INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (9, 'Administration Documents','{1,9}', true, 1, 99);
-- INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (10,'Communication Setup','{1,10}', true, 1, 99);
-- INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (11,'CNR+TVC','{1,10,11}', true, 10, 99);
-- INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (12,'Video+Announcement','{1,10,12}', true, 10, 99);
-- new global documents structure 2022-07-18
INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (13, 'Administration Documents','{1,13}', true, 1, 99);
INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (14, 'Training and OCT Branch','{1,14}', true, 1, 99);
INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (15, 'Tactical Evaluation Section','{1,15}', true, 1, 99);
INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (16, 'Plans and Execution Branch','{1,16}', true, 1, 99);
INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (17, 'EXCON Support Team','{1,16,17}', true, 16, 99);
INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (18, 'Airspace Coordination','{1,16,18}', true, 16, 99);
INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (19, 'EXCON Team 1','{1,16,19}', true, 16, 99);
INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (20, 'EXCON Team 2','{1,16,20}', true, 16, 99);
INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (21, 'EXCON Team 3','{1,16,21}', true, 16, 99);
INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (22, 'Range Operation Section','{1,22}', true, 1, 99);
INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (23, 'Communication Setup','{1,23}', true, 1, 99);
INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (24, 'Documentation','{1,24}', true, 1, 99);
INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (25, 'Plan Editor Favourites','{1,25}', true, 1, 99);
INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (26, 'RME','{1,26}', true, 1, 99);
INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (27, 'Support Documents','{1,27}', true, 1, 99);
INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (28, 'TNE Lists','{1,28}', true, 1, 99);
INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (29, 'Tactical Plans','{1,29}', true, 1, 99);
INSERT INTO flm.flm_folder (id, name, path, is_editable, parent_id, operator_id) VALUES (30, 'Tactical Symbols','{1,30}', true, 1, 99);
ALTER SEQUENCE flm.flm_folder_id_seq RESTART WITH 31;
UPDATE flm.flm_folder SET last_modified = extract(epoch from (now() at time zone 'utc')::timestamp(0)) * 1000 WHERE last_modified IS null; --today in miliseconds