This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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