-- $Id$
--
-- Voeg kolom toe aan tabel om aan te geven of deze persoon gedistrubueerd moet worden over de omgevingen.

DEFINE thisfile = 'SMKA1.SQL'
DEFINE dbuser   = '^SMKA'
DEFINE custid   = 'SMKA'

SET ECHO ON
SET DEFINE ON
COLUMN fcltlogfile NEW_VALUE fcltlogfile NOPRINT;
WHENEVER SQLERROR EXIT;
SELECT adm.scriptspoolfile('&dbuser', '&thisfile') AS fcltlogfile FROM DUAL;
WHENEVER SQLERROR CONTINUE;
SPOOL &fcltlogfile
SET DEFINE OFF

------ payload begin ------

UPDATE fac_version SET fac_version_cust = 'SMKA', fac_version_otap = NULL;


-- AAXX EXACT
-- AAXX VERWERK_EXACT
-- SMKA EXACT_VERKOOP
-- SMKA EXACT_VERKOOP_VJ
-- SMKA EXACT_UREN
-- SMKA VERWERK_EXACT_UREN
-- SMKA BUNDEL_CATERING
-- AAXX DAILY_TASK

INSERT INTO fac_export_app (fac_export_app_code,
                            fac_export_app_oms,
                            fac_functie_key,
                            fac_export_app_folder,
                            fac_export_app_file_prefix,
                            fac_export_app_postfix,
                            fac_export_app_log_postfix,
                            fac_export_app_flags,
                            fac_export_app_timestamp,
                            fac_export_app_prefix)
    VALUES ('EXACT',
            '',
            66,
            'd:\Apps\Facilitor\Webdav\aafm\Productie\SMKA\inkoop',
            'exact_smka_',
            '.xml',
            '.log',
            2,
            'yyyymmdd',
            'AAXX');

INSERT INTO fac_export_app (fac_export_app_code,
                            fac_export_app_oms,
                            fac_functie_key,
                            fac_export_app_folder,
                            fac_export_app_file_prefix,
                            fac_export_app_postfix,
                            fac_export_app_log_postfix,
                            fac_export_app_flags,
                            fac_export_app_timestamp,
                            fac_export_app_prefix)
    VALUES ('VERWERK_EXACT',
            '',
            66,
            '.\LOG',
            'exact_smka_',
            '.csv',
            '.log',
            2,
            'yyyymmdd',
            'AAXX');

INSERT INTO fac_export_app (fac_export_app_code,
                            fac_export_app_oms,
                            fac_functie_key,
                            fac_export_app_folder,
                            fac_export_app_file_prefix,
                            fac_export_app_postfix,
                            fac_export_app_log_postfix,
                            fac_export_app_flags,
                            fac_export_app_timestamp,
                            fac_export_app_prefix)
    VALUES ('EXACT_VERKOOP',
            '',
            66,
            'd:\Apps\Facilitor\Webdav\aafm\Productie\SMKA\verkoop',
            'exact_vk_smka_',
            '.csv',
            '.log',
            2,
            'yyyymmdd',
            'SMKA');

INSERT INTO fac_export_app (fac_export_app_code,
                            fac_export_app_oms,
                            fac_functie_key,
                            fac_export_app_folder,
                            fac_export_app_file_prefix,
                            fac_export_app_postfix,
                            fac_export_app_log_postfix,
                            fac_export_app_flags,
                            fac_export_app_timestamp,
                            fac_export_app_prefix)
    VALUES ('EXACT_VERKOOP_VJ',
            '',
            66,
            'd:\Apps\Facilitor\Webdav\aafm\Productie\SMKA\verkoop',
            'exact_vk_smka_vj_',
            '.csv',
            '.log',
            2,
            'yyyymmdd',
            'SMKA');

INSERT INTO fac_export_app (fac_export_app_code,
                            fac_export_app_oms,
                            fac_functie_key,
                            fac_export_app_folder,
                            fac_export_app_file_prefix,
                            fac_export_app_postfix,
                            fac_export_app_log_postfix,
                            fac_export_app_flags,
                            fac_export_app_timestamp,
                            fac_export_app_prefix)
    VALUES ('EXACT_UREN',
            '',
            66,
            'd:\Apps\Facilitor\Webdav\aafm\Productie\SMKA\uren',
            'smka_exact_uren_',
            '.xml',
            '.log',
            2,
            'yyyymmdd',
            'SMKA');

INSERT INTO fac_export_app (fac_export_app_code,
                            fac_export_app_oms,
                            fac_functie_key,
                            fac_export_app_folder,
                            fac_export_app_file_prefix,
                            fac_export_app_postfix,
                            fac_export_app_log_postfix,
                            fac_export_app_flags,
                            fac_export_app_timestamp,
                            fac_export_app_prefix)
    VALUES ('VERWERK_EXACT_UREN',
            '',
            66,
            '.\LOG',
            'smka_vw_exact_uren_',
            '.csv',
            '.log',
            2,
            'yyyymmdd',
            'SMKA');

INSERT INTO fac_export_app (fac_export_app_code,
                            fac_export_app_oms,
                            fac_functie_key,
                            fac_export_app_folder,
                            fac_export_app_file_prefix,
                            fac_export_app_postfix,
                            fac_export_app_log_postfix,
                            fac_export_app_flags,
                            fac_export_app_timestamp,
                            fac_export_app_prefix)
    VALUES ('BUNDEL_CATERING',
            '',
            66,
            '.\LOG',
            'catering_smka_',
            '.csv',
            '.log',
            2,
            'yyyymmdd',
            'SMKA');

INSERT INTO fac_export_app (fac_export_app_code,
                            fac_export_app_oms,
                            fac_functie_key,
                            fac_export_app_folder,
                            fac_export_app_file_prefix,
                            fac_export_app_postfix,
                            fac_export_app_log_postfix,
                            fac_export_app_flags,
                            fac_export_app_timestamp,
                            fac_export_app_prefix)
    VALUES ('DAILY_TASK',
            '',
            66,
            '.\LOG',
            'daily_task_',
            '.csv',
            '.log',
            0,
            'yyyymmdd',
            'AAXX');

------ payload end   ------

SET DEFINE OFF
BEGIN adm.systrackscriptId ('$Id$', 1); END;
/

COMMIT;
SET ECHO OFF
SPOOL OFF
SET DEFINE ON
PROMPT Logfile of this upgrade is: &fcltlogfile