-- SQL statements which are executed at application startup if hibernate.hbm2ddl.auto is 'create' or 'create-drop'


INSERT INTO app_configuration (id, value, variable) VALUES (1, 'PDCSimulator', 'sendingApplication');
INSERT INTO app_configuration (id, value, variable) VALUES (2, 'IHE2', 'sendingFacility');
INSERT INTO app_configuration (id, value, variable) VALUES (3, '@PID.5.1^A*', 'queryString');
INSERT INTO app_configuration (id, value, variable) VALUES (4, '23', 'numberOfRowsToReturn');
INSERT INTO app_configuration (id, value, variable) VALUES (5, '', 'continuationPointer');

INSERT INTO app_configuration(id, variable, value) VALUES (6, 'application_admin_email', 'eric.poiseau@inria.fr');
INSERT INTO app_configuration(id, variable, value) VALUES (7, 'application_issue_tracker_url', 'http://gazelle.ihe.net/jira');
INSERT INTO app_configuration(id, variable, value) VALUES (8, 'application_name', 'PDQ PDC Simulator');
INSERT INTO app_configuration(id, variable, value) VALUES (9, 'application_release_notes_url', 'http://gazelle.ihe.net');
INSERT INTO app_configuration(id, variable, value) VALUES (10, 'application_time_zone', 'UTC+01');
INSERT INTO app_configuration(id, variable, value) VALUES (11, 'application_admin_name', 'Eric Poiseau');

SELECT pg_catalog.setval('app_configuration_id_seq', 12, true);

-- admin password is blank
insert into user_account (id, username, password_hash, enabled) values (1, 'admin', 'Ss/jICpf9c9GeJj8WKqx1hUClEE=', true);
insert into user_role (id, name, conditional) values (1, 'admin', false);
insert into user_role (id, name, conditional) values (2, 'member', false);
insert into user_role (id, name, conditional) values (3, 'guest', true);
insert into user_account_role (account_id, member_of_role) values (1, 1);
insert into user_role_group (role_id, member_of_role) values (1, 2);

SELECT pg_catalog.setval('user_account_id_seq', 1, true);
SELECT pg_catalog.setval('user_role_id_seq', 3, true);

INSERT INTO gs_test_instance_status(id, keyword, label_to_display, description) VALUES (1, 'started', 'started', 'started');
INSERT INTO gs_test_instance_status(id, keyword, label_to_display, description) VALUES (2, 'completed', 'completed', 'completed');
SELECT pg_catalog.setval('gs_test_instance_status_id_seq', 2, true);

