Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@Bean
public SpringLiquibase springLiquibase(DataSource dataSource) throws SQLException {
// here we create the schema first if not yet created before
tryToCreateSchema(dataSource);
SpringLiquibase liquibase = new SpringLiquibase();
// we want to drop the datasbe if it was created before to have immutable version
liquibase.setDropFirst(true);
liquibase.setDataSource(dataSource);
//you set the schema name which will be used into ur integration test
liquibase.setDefaultSchema("test");
// the classpath reference for your liquibase changlog
liquibase.setChangeLog("classpath:/db/changelog/changelog-master.xml");
return liquibase;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.