Java Code Examples for liquibase.integration.spring.SpringLiquibase#setChangeLog()

The following examples show how to use liquibase.integration.spring.SpringLiquibase#setChangeLog() . 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 vote down vote up
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: RepositoryConfig.java    From elucidate-server with MIT License 5 votes vote down vote up
@Bean(name = "liquibaseMigrations")
public SpringLiquibase liquibaseMigrations() throws PropertyVetoException {
    SpringLiquibase liquibase = new SpringLiquibase();
    liquibase.setDataSource(dataSource());
    liquibase.setChangeLog("classpath:database/liquibase-changelog.xml");

    return liquibase;
}
 
Example 3
Source File: DITestingConfiguration.java    From waltz with Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example 4
Source File: ScoreDefaultDatasourceContext.java    From score with Apache License 2.0 5 votes vote down vote up
@Bean
SpringLiquibase liquibase() {
    SpringLiquibase springLiquibase = new SpringLiquibase();
    springLiquibase.setDataSource(dataSource());
    springLiquibase.setChangeLog("classpath:/META-INF/database/score.changes.xml");
    return springLiquibase;
}
 
Example 5
Source File: DatabaseConfiguration.java    From multiapps-controller with Apache License 2.0 4 votes vote down vote up
private SpringLiquibase getLiquibaseTemplate(DataSource dataSource, String changeLog) {
    SpringLiquibase springLiquibase = new SpringLiquibase();
    springLiquibase.setDataSource(dataSource);
    springLiquibase.setChangeLog(changeLog);
    return springLiquibase;
}