Rollback fails when Liquibase is run in Spring

Description

Our Spring Boot 2.0.5 project uses Liquibase 3.5.5.

Executing a rollback fails to roll back db changes when rollback is executed using Liquibase Maven plugin. The plugin indicates that the goal completed successfully, but nothing is rolled back.

I'll cut right to the chase. The root of the problem appears to be a mismatch between (1) the value stored in the "filename" column of the databasechangelog table and (2) the value passed to the changeLogFile configuration parameter of the Liquibase Maven plugin.

The value stored in the "filename" column starts with "classpath:". For example, "classpath:/db/changelog/002-psl.xml". If I pass this value to the changeLogFile parameter of the Maven plugin and then run the rollback goal, the plugin complains that it cannot find the changeLogFile. If I instead use the value "db/changelog/002-pls.xml", the plugin finds the changelog file, but nothing gets rolled back.

If I change the value in the "filename" column from "classpath:/db/changelog/002-psl.xml" to "db/changelog/002-psl.xml" (which matches exactly the value passed to the changeLogFile parameter), then the database change is rolled back successfully.

Our rollback tests were run for the addColumn Liquibase bundled change.

Environment

Spring Boot 2.0.5
PostgreSQL 9.6.6
Liquibase Maven plugin 3.5.5

Activity

Show:

ranjith kumar April 28, 2020 at 4:39 AM

Any update on this issue. I am also facing it when trying to execute rollback from maven plugin.

Details

Reporter

Affects versions

Priority

Created December 7, 2018 at 2:12 AM
Updated April 28, 2020 at 4:39 AM