Class LiquibaseSchemaHelper
java.lang.Object
com.atlassian.crowd.util.persistence.hibernate.LiquibaseSchemaHelper
- All Implemented Interfaces:
SchemaHelper
Handles creating and upgrading the schema by running liquibase changelogs.
-
Constructor Summary
ConstructorDescriptionLiquibaseSchemaHelper
(String configFile, com.atlassian.config.db.HibernateConfig hibernateConfig) LiquibaseSchemaHelper
(String configFile, Properties... partialProps) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Creates the schema in the database.boolean
databaseContainsExistingData
(Connection connection) void
void
If there are any updates to the Schema needed, do them.
-
Constructor Details
-
LiquibaseSchemaHelper
-
LiquibaseSchemaHelper
public LiquibaseSchemaHelper(String configFile, com.atlassian.config.db.HibernateConfig hibernateConfig)
-
-
Method Details
-
updateSchemaIfNeeded
public void updateSchemaIfNeeded()Description copied from interface:SchemaHelper
If there are any updates to the Schema needed, do them.- Specified by:
updateSchemaIfNeeded
in interfaceSchemaHelper
-
createSchema
public void createSchema()Description copied from interface:SchemaHelper
Creates the schema in the database. This will try to drop and create the schema.- Specified by:
createSchema
in interfaceSchemaHelper
-
dropSchema
public void dropSchema() -
databaseContainsExistingData
- Specified by:
databaseContainsExistingData
in interfaceSchemaHelper
-