REM This script flags objects to be reloaded for 4_8 Upgrade

DECLARE

BEGIN



-- THE FOLLOWING PATCHES HAVE BEEN ROLLED IN
--
-- PATCH   OWNER      CI_TYPE                  CI_FILENAME    CI_NAME              CI_STAGE
-- =====   ========   ======================   ============   ==================   ========
-- 001     STLYON     TABLE                                   CK_REPORT_FOLDERS    CKTABS
--                    PRIMARY KEY CONSTRAINT                  CK_RPT_FOLDERS_PK    CKCONST
--                    also META
--
-- 002     LOLDHAM    PACKAGE BODY             jrimpact.jpb   JR_DEL_IMPACT        JRPACK
--
-- 003     AMITKUM    only META
--                    not part of upgrade since table GENERATABLE_EVENT_CODE
--                    is not part of Repository server
--
-- 004 (empty)
--
-- 005     LOLDHAM    PACKAGE BODY             cispv.hpb      CIHSPV               CKPACK
--                    also instance data
--
-- 006 (empty)
--
-- 007     AMITKUM    only META
--
-- 008     AMITKUM    only META
--
-- 009     KPARTHAS   PACKAGE BODY             cdwp_txt.pkb   CDWP_TXT             CKROBPAC
--                    PACKAGE BODY             odwa_fol.pkb   ODWA_FOL             CKROBPAC
--                    PACKAGE BODY             odwabrow.pkb   ODWABROW             CKROBPAC
--
-- 010 (empty)





-- UPDATES THE OBJECTS IN THE FOLLOWING STAGES
-- CKCONST -- already done
-- CKPACK -- already done
-- CKROBPAC -- already done
-- CKTABS -- already done
-- JRPACK -- already done





  -- UPDATE FOR PACKAGE BODIES
  UPDATE CK_INSTALLED_OBJECTS
  SET    CI_CREATED = 'R'
  WHERE  CI_TYPE    = 'PACKAGE BODY'
  AND    CI_NAME IN ( 'JR_DEL_IMPACT'
                    , 'CIHSPV'
                    , 'CDWP_TXT'
                    , 'ODWA_FOL'
                    , 'ODWABROW' );





  -- UPDATE FOR TABLES
  UPDATE CK_INSTALLED_OBJECTS
  SET    CI_CREATED = 'R'
  WHERE  CI_TYPE    = 'TABLE'
  AND    CI_NAME IN ( 'CK_REPORT_FOLDERS' );





  -- UPDATE FOR CONSTRAINTS
  UPDATE CK_INSTALLED_OBJECTS
  SET    CI_CREATED = 'R'
  WHERE  CI_TYPE    = 'CONSTRAINT'
  AND    CI_NAME IN ( 'CK_RPT_FOLDERS_PK' );





  -- Update for verify of stage
  UPDATE CK_INSTALLED_OBJECTS
  SET    CI_CREATED = 'Y'
  WHERE  CI_STAGE   = 'CKUPD4_8';



  COMMIT;



EXCEPTION

  WHEN OTHERS THEN
    dbms_output.put_line('* Exception Raised  ');
    dbms_output.put_line('...ERROR: '||substrb(sqlerrm,1,240));
    rollback work;
    RAISE;

END;
/
