ALTER TABLE IDN_OAUTH2_TOKEN_BINDING ADD UNIQUE (TOKEN_ID,TOKEN_BINDING_TYPE,TOKEN_BINDING_VALUE);

CREATE ALIAS IF NOT EXISTS DROP_CONSTRAINT AS $$ void executeSql(Connection conn, String sql) throws SQLException { conn.createStatement().executeUpdate(sql); } $$;

CALL DROP_CONSTRAINT('ALTER TABLE IDN_OAUTH2_TOKEN_BINDING DROP CONSTRAINT ' || (SELECT CONSTRAINT_NAME FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE TABLE_NAME = 'IDN_OAUTH2_TOKEN_BINDING' AND CONSTRAINT_TYPE='PRIMARY KEY'));

DROP ALIAS IF EXISTS DROP_CONSTRAINT;
