Applies to
- Liquibase Pro
- Liquibase Open Source (Community)
Conditions
- Liquibase Pro or Open Source v4.18.X or v4.19.0
Issue Summary
In Liquibase versions 4.18.x and 4.19.0, the DATABASECHANGELOG table handles file paths inconsistently, particularly with leading slashes. This inconsistency can lead to issues during operations like rollbacks, where Liquibase may not correctly identify changesets due to mismatched file paths.
Symptoms:
- Changeset Execution Logging: When executing a changelog, the DATABASECHANGELOG table may record the FILENAME with a leading slash (e.g., /db/002.yaml).
- Rollback Failures: Attempting to perform a rollback to a specific tag may fail because Liquibase cannot locate the changeset due to the leading slash discrepancy.
Error Message
There isn't an error message, but you will notice that scripts aren't picked up to be rolled back.
Root Cause
The root cause is that Liquibase inserted a forward slash before the file name, which was identified as a bug.
Resolution
This issue has been addressed in Liquibase version 4.21.0. Upgrading to this version or later resolves the inconsistent file path handling. Users have confirmed that the problem is resolved in version 4.21.0.
Recommendations:
- Upgrade Liquibase: Update your Liquibase installation to version 4.21.0 or later to benefit from the fix.
- Verify Changeset Paths: After upgrading, ensure that the FILENAME entries in the DATABASECHANGELOG table are consistent and do not contain unintended leading slashes.
- Test Rollbacks: Perform rollback operations in a controlled environment to confirm that changesets are correctly identified and applied.
By keeping Liquibase updated and monitoring the DATABASECHANGELOG entries, you can maintain consistent database migrations and avoid issues related to file path discrepancies.
Comments
0 comments
Article is closed for comments.