__IF_EXISTS__
SELECT 1
  FROM CI_UT_INSTL_DTL
 WHERE SCRIPT_FILE_NAME = 'FW410_BPSCHEMA9.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_XAI_SVC_VERS'
/

__THEN__

DROP TABLE CI_XAI_SVC_VERS CASCADE CONSTRAINTS
/

__ENDIF__


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

__THEN__

DROP TABLE CI_XAI_SVC_VERS_L CASCADE CONSTRAINTS
/

__ENDIF__


__IF_EXISTS__
SELECT 1
  FROM USER_TAB_COLUMNS
 WHERE TABLE_NAME = 'CI_XAI_IN_SVC'
   AND COLUMN_NAME = 'XAI_VERSION_ID'
/

__THEN__

ALTER TABLE CI_XAI_IN_SVC DROP COLUMN XAI_VERSION_ID
/

__ENDIF__


__IF_EXISTS__
SELECT 1
  FROM USER_TAB_COLUMNS
 WHERE TABLE_NAME = 'CI_XAI_JDBC_CON'
   AND COLUMN_NAME = 'DATABASE_NAME'
/

__THEN__

ALTER TABLE CI_XAI_JDBC_CON DROP COLUMN DATABASE_NAME
/

__ENDIF__









