-- Customer specific once-script DENB#34280.
--
-- (c) 2015 Facilitor B.V.
--
-- Support: +31 53 4800700
SET ECHO ON
SPOOL xdenb#34280.lst
SET DEFINE OFF

UPDATE fac_import_app
   SET fac_import_app_xsl = 'xsl/beaufort.xsl',
       fac_import_app_charset = 'utf-8',
       fac_import_app_folder = NULL,
       fac_import_app_files = 'PRS*.xml'
 WHERE fac_import_app_key = 21;

INSERT INTO fac_api (fac_api_name,
                     fac_api_omschrijving,
                     fac_api_filepath,
                     fac_api_loglevel,
                     fac_import_app_key,
                     fac_api_options_json)
   SELECT 'PRSIMP',
          'Personen uit Beaufort',
          'appl/API/api_gen_import.asp',
          1,
          fac_import_app_key,
          '{"import_app_key":' || TO_CHAR (fac_import_app_key) || '}'
     FROM fac_import_app
    WHERE fac_import_app_code = 'PRS' AND fac_import_app_prefix = 'DENB';

INSERT INTO prs_perslid (prs_perslid_module,
                         prs_srtperslid_key,
                         prs_afdeling_key,
                         prs_perslid_naam,
                         prs_perslid_oslogin,
                         prs_perslid_flags,
                         prs_perslid_apikey)
   SELECT p.prs_perslid_module,
          p.prs_srtperslid_key,
          p.prs_afdeling_key,
          'Pseudo-user tbv. PRSIMP-API',
          '_BEAUFORT',
          0,
          'CDUvKAJBWmDNmzHQguuhwmLSkdnqIVxy'
     FROM prs_perslid p
    WHERE p.prs_perslid_oslogin = '_FACILITOR';

COMMIT;
BEGIN adm.systrackscriptId('$Id$'); END;
/
SPOOL OFF
