--
-- $Id$
--
-- Last minute wijzigingen sinds DB34z

DEFINE thisfile = 'DB34zto34.sql'
DEFINE dbuser   = '*'

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 ------

--/////////////////////////////////////////////////////////////////////////////////////////// FSN#52431
CREATE OR REPLACE VIEW fac_v_rap_auditfail AS SELECT * FROM fac_auditfail;

UPDATE fac_usrrap
   SET fac_usrrap_view_name = 'fac_v_rap_auditfail'
 WHERE fac_usrrap_view_name = 'fac_auditfail';

--/////////////////////////////////////////////////////////////////////////////////////////// FCLT#53559
ALTER TABLE bes_srtkenmerk
    MODIFY bes_srtkenmerk_systeem NUMBER(2);

ALTER TABLE cnt_srtkenmerk
    MODIFY cnt_srtkenmerk_systeem NUMBER(2);

ALTER TABLE ins_srtkenmerk
    MODIFY ins_srtkenmerk_systeem NUMBER(2);

ALTER TABLE mld_srtkenmerk
    MODIFY mld_srtkenmerk_systeem NUMBER(2);

ALTER TABLE res_srtkenmerk
    MODIFY res_srtkenmerk_systeem NUMBER(2);

ALTER TABLE alg_kenmerk
    MODIFY alg_kenmerk_systeem NUMBER(2);

ALTER TABLE bez_kenmerk
    MODIFY bez_kenmerk_systeem NUMBER(2);

ALTER TABLE faq_kenmerk
    MODIFY faq_kenmerk_systeem NUMBER(2);

ALTER TABLE fin_kenmerk
    MODIFY fin_kenmerk_systeem NUMBER(2);

ALTER TABLE prs_kenmerk
    MODIFY prs_kenmerk_systeem NUMBER(2);

--/////////////////////////////////////////////////////////////////////////////////////////// FCLT#53724
ALTER TABLE res_srtkenmerk DROP CONSTRAINT res_c_res_srtkenmerk_systeem;

UPDATE res_srtkenmerk
   SET res_srtkenmerk_systeem = 0
 WHERE res_srtkenmerk_systeem IS NULL;

ALTER TABLE res_srtkenmerk
     MODIFY res_srtkenmerk_systeem DEFAULT 0 NOT NULL;

------ 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
