__IF_EXISTS__
SELECT 1 FROM CI_UT_INSTL_DTL WHERE SCRIPT_FILE_NAME = 'FW43060_BPSCHEMA_OUAF-5056.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_TABLES WHERE TABLE_NAME = 'F1_CRYPTO_KEY_RING'
/
__ELSE__
__EXIT__
__ENDIF__

__IF_EXISTS__
SELECT 1  FROM USER_TAB_COLUMNS WHERE TABLE_NAME = 'F1_CRYPTO_KEY_RING' AND COLUMN_NAME = 'KEY_RING_STATUS_FLG'
/
__THEN__
ALTER TABLE F1_CRYPTO_KEY_RING DROP COLUMN KEY_RING_STATUS_FLG
/
__ELSE__
__ENDIF__

__IF_EXISTS__
SELECT 1 FROM USER_TABLES WHERE TABLE_NAME = 'F1_CRYPTO_KEY'
/
__ELSE__
__EXIT__
__ENDIF__

__IF_EXISTS__
SELECT 1  FROM USER_TAB_COLUMNS WHERE TABLE_NAME = 'F1_CRYPTO_KEY' AND COLUMN_NAME = 'CREATION_DTTM'
/
__THEN__
ALTER TABLE F1_CRYPTO_KEY DROP COLUMN CREATION_DTTM
/
__ELSE__
__ENDIF__
