--MARS-770

set verify off
SET serveroutput ON
--SET TIMING ON
whenever sqlerror exit sql.sqlcode rollback;

column owner format a15
column object_name format a30
column spoolname new_value spoolname 

select 'install_package_MarsGeneralRelease_MARS770_dev_' || name || '_' ||to_char(sysdate,'YYYYMMDD_HH24MISS')||'.log' spoolname from v$pdbs;
spool '&spoolname'


prompt ##### started at time #####
select systimestamp from dual;
prompt ##### database name #####
select name pdb_name from v$pdbs;

--set echo on
--=============================================================================================================================
-- start install --MARS-770 payload dev specific part
--=============================================================================================================================

INSERT INTO CT_MRDS.A_FILE_MANAGER_CONFIG (ENVIRONMENT_ID, CONFIG_VARIABLE, CONFIG_VARIABLE_VALUE, CONFIG_VARIABLE_COMMENT) VALUES ('default', 'EnvironmentID', 'dev', '');
INSERT INTO CT_MRDS.A_FILE_MANAGER_CONFIG (ENVIRONMENT_ID, CONFIG_VARIABLE, CONFIG_VARIABLE_VALUE, CONFIG_VARIABLE_COMMENT) VALUES ('dev', 'Region', 'eu-frankfurt-1', 'OCI region for dev environment');
INSERT INTO CT_MRDS.A_FILE_MANAGER_CONFIG (ENVIRONMENT_ID, CONFIG_VARIABLE, CONFIG_VARIABLE_VALUE, CONFIG_VARIABLE_COMMENT) VALUES ('dev', 'NameSpace', 'frcnomajoc7v', 'OCI namespace for dev environment');
INSERT INTO CT_MRDS.A_FILE_MANAGER_CONFIG (ENVIRONMENT_ID, CONFIG_VARIABLE, CONFIG_VARIABLE_VALUE, CONFIG_VARIABLE_COMMENT) VALUES ('dev', 'InboxBucketName', 'mrds_inbox_dev', 'Name of the inbox bucket for dev environment');
INSERT INTO CT_MRDS.A_FILE_MANAGER_CONFIG (ENVIRONMENT_ID, CONFIG_VARIABLE, CONFIG_VARIABLE_VALUE, CONFIG_VARIABLE_COMMENT) VALUES ('dev', 'DataBucketName', 'mrds_data_dev', 'Name of the data bucket for dev environment');
INSERT INTO CT_MRDS.A_FILE_MANAGER_CONFIG (ENVIRONMENT_ID, CONFIG_VARIABLE, CONFIG_VARIABLE_VALUE, CONFIG_VARIABLE_COMMENT) VALUES ('dev', 'HistoryBucketName', 'mrds_hist_dev', 'Name of the history bucket for dev environment');
INSERT INTO CT_MRDS.A_FILE_MANAGER_CONFIG (ENVIRONMENT_ID, CONFIG_VARIABLE, CONFIG_VARIABLE_VALUE, CONFIG_VARIABLE_COMMENT) VALUES ('dev', 'CredentialName', 'OCI$RESOURCE_PRINCIPAL', 'Name of the credential for dev environment');
INSERT INTO CT_MRDS.A_FILE_MANAGER_CONFIG (ENVIRONMENT_ID, CONFIG_VARIABLE, CONFIG_VARIABLE_VALUE, CONFIG_VARIABLE_COMMENT) VALUES ('dev', 'LoggingEnabled', 'ON', 'Enable logging for dev environment');
INSERT INTO CT_MRDS.A_FILE_MANAGER_CONFIG (ENVIRONMENT_ID, CONFIG_VARIABLE, CONFIG_VARIABLE_VALUE, CONFIG_VARIABLE_COMMENT) VALUES ('dev', 'MinLogLevel', 'DEBUG', 'Minimum logging level for dev environment');
INSERT INTO CT_MRDS.A_FILE_MANAGER_CONFIG (ENVIRONMENT_ID, CONFIG_VARIABLE, CONFIG_VARIABLE_VALUE, CONFIG_VARIABLE_COMMENT) VALUES ('dev', 'DefaultDateFormat', 'DD/MM/YYYY HH24:MI:SS', 'Default date format for dev environment');
INSERT INTO CT_MRDS.A_FILE_MANAGER_CONFIG (ENVIRONMENT_ID, CONFIG_VARIABLE, CONFIG_VARIABLE_VALUE, CONFIG_VARIABLE_COMMENT) VALUES ('dev', 'ConsoleLoggingEnabled', 'ON', 'Controls whether log messages are also displayed in console using DBMS_OUTPUT.PUT_LINE');

COMMIT;