
CREATE TABLE app_configuration(id, variable, value) (
    id integer NOT NULL,
    value character varying(255),
    variable character varying(255)
);

ALTER TABLE public.app_configuration(id, variable, value) OWNER TO gazelle;

ALTER TABLE ONLY app_configuration
    ADD CONSTRAINT app_configuration_pkey PRIMARY KEY (id);

ALTER TABLE app_configuration(id, variable, value) ADD CONSTRAINT variable_unique UNIQUE (variable);

CREATE SEQUENCE app_configuration_id_seq
  INCREMENT 1
  MINVALUE 1
  MAXVALUE 9223372036854775807
  START 1
  CACHE 1;
ALTER TABLE app_configuration_id_seq
  OWNER TO gazelle;


INSERT INTO app_configuration(id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'evs_client_url', 'https://gazelle.ihe.net/EVSClient/');
INSERT INTO app_configuration(id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'storage_dicom', '/opt/proxy/DICOM');
--Not use for the moment
--INSERT INTO app_configuration(id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'cas_service', 'http://gazelle.ihe.net/proxy/');
INSERT INTO app_configuration(id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'application_works_without_cas', 'false');
INSERT INTO app_configuration(id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'application_release_notes_url', 'http://gazelle.ihe.net/jira/browse/PROXY#selectedTab=com.atlassian.jira.plugin.system.project%3Achangelog-panel');
INSERT INTO app_configuration(id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'application_documentation', 'http://gazelle.ihe.net/content/proxy-0');
INSERT INTO app_configuration(id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'application_issue_tracker', 'http://gazelle.ihe.net/jira/browse/PROXY');
INSERT INTO app_configuration(id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'proxy_ip_addresses','<%= node['gazelle_platform_configuration']['ip_address'] %>');
INSERT INTO app_configuration(id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'min_proxy_port', '10199');
INSERT INTO app_configuration(id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'max_proxy_port', '13000');
INSERT INTO app_configuration(id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'time_zone', 'Europe/Paris');
INSERT INTO app_configuration(id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'application_url','<%= node['gazelle_platform_configuration']['protocol'] %>://<%= node['gazelle_proxy']['fdqn'] %>/<%= node['gazelle_proxy']['apache']['proxy']['path'] %>');
INSERT INTO app_configuration(id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'cas_url','<%= node['gazelle_proxy']['cas']['url'] %>');
INSERT INTO app_configuration(id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'proxy_oid', '1.3.6.1.4.1.12559.11.22.3');
INSERT INTO app_configuration(id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'ip_login', 'false');
INSERT INTO app_configuration(id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'ip_login_admin', '.*');
INSERT INTO app_configuration(id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'dcmdump_path', '/usr/bin/dcmdump');
INSERT INTO app_configuration(id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'NUMBER_OF_ITEMS_PER_PAGE', '20');
INSERT INTO app_configuration(id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'jms_communication_is_enabled', 'false');