-- Customer specific once-script RWSN56.
--
-- (c) 2014 SG|facilitor bv
-- $Revision$
-- $Id$
--
-- Support: +31 53 4800700
SET ECHO ON
SPOOL xRWSN56.lst
SET DEFINE OFF

-- RWSN#27296: Clean-up deprecated (and no longer used) ISDM-stuff!
-- 184=ISDM_STATUS-import
DELETE FROM fac_import WHERE fac_import_app_key = 184;
DELETE FROM fac_import_app WHERE fac_import_app_key = 184;
DROP PROCEDURE rwsn_import_isdm_status;
DROP PROCEDURE rwsn_update_isdm_status;
DROP TABLE rwsn_imp_isdmstatusmulti;

COMMIT;

-- 5=ISDM_OPDR-export
DELETE FROM fac_export_app WHERE fac_export_app_key = 5;
DROP PROCEDURE rwsn_select_isdm_opdr;
DROP PROCEDURE rwsn_export_isdm_opdr;
DROP VIEW rwsn_v_export_isdm_opdr;

COMMIT;

-- RWSN#30371: Medewerkers plus leidingevende tbv. 61=Beheer:Gebruikersbeheer
CREATE OR REPLACE VIEW rwsn_v_rap_ldg_per_medewerker AS SELECT NULL x FROM DUAL;
INSERT INTO FAC_USRRAP (fac_usrrap_omschrijving,
                        fac_usrrap_view_name,
                        fac_usrrap_in_huidige_locatie,
                        fac_usrrap_template,
                        fac_usrrap_macro,
                        fac_usrrap_vraagbegindatum,
                        fac_usrrap_vraageinddatum,
                        fac_usrrap_functie,
                        fac_usrrap_info,
                        fac_functie_key,
                        fac_usrrap_autorefresh)
    VALUES ('Medewerkers plus leidinggevende',
            'rwsn_v_rap_ldg_per_medewerker',
            NULL,
            NULL,
            NULL,
            0,
            0,
            0,
            'RWSN#30371',
            61,
            0);

COMMIT;

-- RWSN#30781: Afgesproken kenmerksoort tbv. mee te sturen bijlagen
INSERT INTO mld_srtkenmerk (mld_srtkenmerk_key,
                            mld_srtkenmerk_omschrijving,
                            mld_srtkenmerk_kenmerktype)
    --mld_srtkenmerk_lengte,
    --mld_srtkenmerk_dec,
    --mld_srtkenmerk_nmin,
    --mld_srtkenmerk_nmax,
    --fac_kenmerkdomein_key)
    VALUES (5100, 'Bij afmelden mee te sturen bijlagen', 'M');

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