/*
 Migrates the Airlock IAM DB schema from version 8.4 to version 8.5.
 Written for Oracle DB.
 */

-- Comment out 'SET sqlblanklines on' if you're using a SQL client other than Oracle SQL*Plus
SET sqlblanklines on

ALTER SESSION SET NLS_LENGTH_SEMANTICS='CHAR';


-- Enable the default cache size for all sequences to improve performance
ALTER SEQUENCE A2FA_ACTIVATION_LETTER_SEQ CACHE 20;
ALTER SEQUENCE ACCOUNT_LINK_SEQ CACHE 20;
ALTER SEQUENCE AIRLOCK_2FA_USER_SEQ CACHE 20;
ALTER SEQUENCE FIDO_USER_SEQ CACHE 20;
ALTER SEQUENCE FLOW_CONTINUATION_TOKEN_SEQ CACHE 20;
ALTER SEQUENCE HISTORY_SEQ CACHE 20;
ALTER SEQUENCE LAST_SELECTION_SEQ CACHE 20;
ALTER SEQUENCE OAUTH2_ATTRIBUTES_SEQ CACHE 20;
ALTER SEQUENCE PRINCIPAL_SEQ CACHE 20;
ALTER SEQUENCE REMEMBER_ME_REQUEST_METADATA_SEQ CACHE 20;
ALTER SEQUENCE REMEMBER_ME_TOKEN_SEQ CACHE 20;
ALTER SEQUENCE SUBSCRIPTION_SEQ CACHE 20;
ALTER SEQUENCE TOKEN_SEQ CACHE 20;
