Class LiquibaseJpaUpdaterProvider
- java.lang.Object
-
- org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider
-
- All Implemented Interfaces:
JpaUpdaterProvider
,Provider
public class LiquibaseJpaUpdaterProvider extends Object implements JpaUpdaterProvider
- Author:
- Stian Thorgersen
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.connections.jpa.updater.JpaUpdaterProvider
JpaUpdaterProvider.Status
-
-
Field Summary
Fields Modifier and Type Field Description static String
CHANGELOG
static String
DEPLOYMENT_ID_COLUMN
-
Constructor Summary
Constructors Constructor Description LiquibaseJpaUpdaterProvider(KeycloakSession session)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
export(Connection connection, String defaultSchema, File file)
Exports the SQL update script into the given File.static String
getTable(String table, String defaultSchema)
void
update(Connection connection, String defaultSchema)
Updates the Keycloak databaseprotected void
updateChangeSet(liquibase.Liquibase liquibase, Writer exportWriter)
JpaUpdaterProvider.Status
validate(Connection connection, String defaultSchema)
Checks whether Keycloak database is up to date with the most recent changesetsprotected JpaUpdaterProvider.Status
validateChangeSet(liquibase.Liquibase liquibase, String changelog)
protected JpaUpdaterProvider.Status
validateSynch(Connection connection, String defaultSchema)
-
-
-
Field Detail
-
CHANGELOG
public static final String CHANGELOG
- See Also:
- Constant Field Values
-
DEPLOYMENT_ID_COLUMN
public static final String DEPLOYMENT_ID_COLUMN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LiquibaseJpaUpdaterProvider
public LiquibaseJpaUpdaterProvider(KeycloakSession session)
-
-
Method Detail
-
update
public void update(Connection connection, String defaultSchema)
Description copied from interface:JpaUpdaterProvider
Updates the Keycloak database- Specified by:
update
in interfaceJpaUpdaterProvider
- Parameters:
connection
- DB connectiondefaultSchema
- DB connection
-
export
public void export(Connection connection, String defaultSchema, File file)
Description copied from interface:JpaUpdaterProvider
Exports the SQL update script into the given File.- Specified by:
export
in interfaceJpaUpdaterProvider
- Parameters:
connection
- DB connectiondefaultSchema
- DB schema to usefile
- File to write to
-
updateChangeSet
protected void updateChangeSet(liquibase.Liquibase liquibase, Writer exportWriter) throws liquibase.exception.LiquibaseException, SQLException
- Throws:
liquibase.exception.LiquibaseException
SQLException
-
validate
public JpaUpdaterProvider.Status validate(Connection connection, String defaultSchema)
Description copied from interface:JpaUpdaterProvider
Checks whether Keycloak database is up to date with the most recent changesets- Specified by:
validate
in interfaceJpaUpdaterProvider
- Parameters:
connection
- DB connectiondefaultSchema
- DB schema to use- Returns:
-
validateSynch
protected JpaUpdaterProvider.Status validateSynch(Connection connection, String defaultSchema)
-
validateChangeSet
protected JpaUpdaterProvider.Status validateChangeSet(liquibase.Liquibase liquibase, String changelog) throws liquibase.exception.LiquibaseException
- Throws:
liquibase.exception.LiquibaseException
-
-