I'm facing a problem with spring boot and mvn liquibase. I'm able to update and rollback liquibase via Tag when I submit changes with
mvn liquibase:update
and rollback them with
mvn liquibase:rollback -Dliquibase.rollbackTag=0.0.0
Unfortunately I'm not able to start my spring boot app when I submit changes with liquibase:update.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfiguration$LiquibaseConfiguration.class]: Invocation of init method failed; nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set classpath:db/changelog/changelog-0.0.1.xml::0.0.1::
Which tells me that spring boot tries to run the changesets again.
When I take a look at the databasechangelog table, there a duplicated entries with different deployment_ids, could this be the problem?
Ps: When I let Spring boot do the updating I can run the app, but I can't rollback via CLI :(
Here's my configuration in pom.xml
<plugins>
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.6.3</version>
<configuration>
<driver>org.postgresql.Driver</driver>
<url>connection/url>
<username>user</username>
<password>password</password>
<promptOnNonLocalDatabase>false</promptOnNonLocalDatabase>
<rollbackTag>0.0.0</rollbackTag>
<changeLogFile>destination of rollback file</changeLogFile>
</configuration>
</plugin>
</plugins>
</build>
in application.properties
spring.liquibase.change-log=classpath:db/changelog-master.xml spring.liquibase.test-rollback-on-update=true
I guess the tagging of changelog files is correct, because it wouldn't work in CLI either.
Thank you.