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

__EXIT__

__ENDIF__

__IF_EXISTS__
SELECT 1
  FROM USER_TABLES
 WHERE TABLE_NAME = 'F1_INSTALLATION'
/
__ELSE__

__EXIT__

__ENDIF__


__IF_EXISTS__
SELECT 1
  FROM USER_TAB_COLUMNS
 WHERE TABLE_NAME = 'CI_PORTAL'
   AND COLUMN_NAME = 'USER_CONFIG_OVRD_FLG'
/

__THEN__

ALTER TABLE CI_PORTAL DROP COLUMN USER_CONFIG_OVRD_FLG
/

__ENDIF__


__IF_EXISTS__
SELECT 1
  FROM USER_TAB_COLUMNS
 WHERE TABLE_NAME = 'F1_MAP_L'
   AND COLUMN_NAME = 'HTML_DEFN'
/

__THEN__

ALTER TABLE F1_MAP_L DROP COLUMN HTML_DEFN
/

__ENDIF__


__IF_EXISTS__
SELECT 1
  FROM USER_TAB_COLUMNS
 WHERE TABLE_NAME = 'CI_XAI_SNDR_CTX'
   AND COLUMN_NAME = 'CTXT_VAL'
/

__THEN__

ALTER TABLE CI_XAI_SNDR_CTX DROP COLUMN CTXT_VAL
/

__ENDIF__


__IF_EXISTS__
SELECT 1
  FROM USER_TAB_COLUMNS
 WHERE TABLE_NAME = 'CI_XAI_IN_SVC_L'
   AND COLUMN_NAME = 'DESCR254'
/

__THEN__

ALTER TABLE CI_XAI_IN_SVC_L DROP COLUMN DESCR254
/

__ENDIF__




__IF_EXISTS__
SELECT 1
  FROM USER_TAB_COLUMNS
 WHERE TABLE_NAME = 'CI_SCR_STEP'
   AND COLUMN_NAME = 'SCR_STEP_ID'
/

__THEN__

ALTER TABLE CI_SCR_STEP DROP COLUMN SCR_STEP_ID
/

__ENDIF__


__IF_EXISTS__
SELECT 1
  FROM USER_TAB_COLUMNS
 WHERE TABLE_NAME = 'CI_SCR_STEP_L'
   AND COLUMN_NAME = 'SCR_STEP_ID'
/

__THEN__

ALTER TABLE CI_SCR_STEP_L DROP COLUMN SCR_STEP_ID
/

__ENDIF__


__IF_EXISTS__
SELECT 1
  FROM USER_TAB_COLUMNS
 WHERE TABLE_NAME = 'CI_SCR_PRMPT'
   AND COLUMN_NAME = 'SCR_STEP_ID'
/

__THEN__

ALTER TABLE CI_SCR_PRMPT DROP COLUMN SCR_STEP_ID
/

__ENDIF__


__IF_EXISTS__
SELECT 1
  FROM USER_TAB_COLUMNS
 WHERE TABLE_NAME = 'CI_SCR_PRMPT_L'
   AND COLUMN_NAME = 'SCR_STEP_ID'
/

__THEN__

ALTER TABLE CI_SCR_PRMPT_L DROP COLUMN SCR_STEP_ID
/

__ENDIF__


__IF_EXISTS__
SELECT 1
  FROM USER_TAB_COLUMNS
 WHERE TABLE_NAME = 'CI_SCR_FLD_MAP'
   AND COLUMN_NAME = 'SCR_STEP_ID'
/

__THEN__

ALTER TABLE CI_SCR_FLD_MAP DROP COLUMN SCR_STEP_ID
/

__ENDIF__


__IF_EXISTS__
SELECT 1
  FROM USER_TAB_COLUMNS
 WHERE TABLE_NAME = 'CI_SCR_STEP_K'
/

__THEN__

DROP TABLE CI_SCR_STEP_K
/

__ENDIF__



__IF_EXISTS__
SELECT 1
  FROM USER_TAB_COLUMNS
 WHERE TABLE_NAME = 'F1_DB_OBJECTS_REPO'
   AND COLUMN_NAME = 'INDEXED_COLUMNS'
/

__THEN__

ALTER TABLE F1_DB_OBJECTS_REPO DROP COLUMN INDEXED_COLUMNS
/

__ENDIF__





