Java Code Examples for liquibase.integration.spring.SpringLiquibase#setDropFirst()
The following examples show how to use
liquibase.integration.spring.SpringLiquibase#setDropFirst() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Utils.java From radman with MIT License | 5 votes |
static SpringLiquibase buildLiquibase(DataSource dataSource, LiquibaseProperties properties) { SpringLiquibase liquibase = new SpringLiquibase(); liquibase.setDataSource(dataSource); liquibase.setChangeLog(properties.getChangeLog()); liquibase.setContexts(properties.getContexts()); liquibase.setDefaultSchema(properties.getDefaultSchema()); liquibase.setDropFirst(properties.isDropFirst()); liquibase.setShouldRun(properties.isEnabled()); liquibase.setLabels(properties.getLabels()); liquibase.setChangeLogParameters(properties.getParameters()); liquibase.setRollbackFile(properties.getRollbackFile()); return liquibase; }
Example 2
Source File: DITestingConfiguration.java From waltz with Apache License 2.0 | 5 votes |
@Bean public SpringLiquibase springLiquibase(DataSource dataSource, DSLContext dsl) throws SQLException { dsl.createSchemaIfNotExists("test").execute(); SpringLiquibase liquibase = new SpringLiquibase(); // we want to drop the database if it was created before to have immutable version liquibase.setDropFirst(true); liquibase.setDataSource(dataSource); liquibase.setDefaultSchema("test"); liquibase.setChangeLog("file:../waltz-data/src/main/ddl/liquibase/db.changelog-master.xml"); return liquibase; }