__IF_EXISTS__
SELECT 1
  FROM CI_UT_INSTL_DTL
 WHERE SCRIPT_FILE_NAME = 'FW400_BPSCHEMA1.SQL'
   AND END_DTTM IS NOT NULL
/
__THEN__

__EXIT__

__ENDIF__

__IF_EXISTS__
SELECT 1
  FROM CI_INSTALL_PROD
 WHERE INSTALL_OPT_ID = '11111'
   AND OWNER_FLG = 'F1'
/
__ELSE__

__EXIT__

__ENDIF__


__IF_EXISTS__
SELECT 1
  FROM USER_TAB_COLUMNS
 WHERE TABLE_NAME = 'CI_MD_TBL_FLD_L'
   AND COLUMN_NAME = 'DESCRLONG_OVRD'
/
__THEN__

alter table CI_MD_TBL_FLD_L DROP COLUMN  DESCRLONG_OVRD
/

__ENDIF__


__IF_EXISTS__
SELECT 1
  FROM USER_TAB_COLUMNS
 WHERE TABLE_NAME = 'CI_BATCH_CTRL'
   AND COLUMN_NAME = 'LANGUAGE_CD'
/
__THEN__

alter table CI_BATCH_CTRL DROP COLUMN LANGUAGE_CD
/

__ENDIF__

__IF_EXISTS__
SELECT 1
  FROM USER_TAB_COLUMNS
 WHERE TABLE_NAME = 'CI_BATCH_CTRL'
   AND COLUMN_NAME = 'BATCH_THREAD_NBR'
/
__THEN__

alter table CI_BATCH_CTRL DROP COLUMN BATCH_THREAD_NBR
/

__ENDIF__


