My Spring Boot api utilizes liquibase and I'm trying to roll back the last liquibase update.
I've tried a couple different commands (followed by my db credentials on the same line):
mvn liquibase:rollback -Dliquibase.rollbackCount=1
and also:
mvn liquibase:rollback -Dliquibase.rollbackDate=2022-11-08
For each, the mvn execution starts out promising, with Successfully acquired change lock
But then each ends up with this error:
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.4.1:rollback (default-cli) on project tve: A type incompatibility occurred while executing org.liquibase:liquibase-maven-plugin:3.4.1:rollback: java.time.LocalDateTime cannot be cast to java.lang.String
Any idea what I'm doing wrong here?
I notice that the most recent rows in my databasechangelog
table show a liquibase version of 4.5.0
, while all the older ones show 3.5.4
. Perhaps that's somehow related to this error?
As it turns out, I was able to resolve this by changing my liquibase-maven-plugin version from 3.4.1 to 4.5.0.
Not exactly sure what the issue was or why that resolved it, but perhaps this may help someone else.