You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating Liquibase (from 3.10.2) we are finding that our migrations are now failing as Liquibase is attempting to re-run old migrations again. Observed this behaviour in 4.25.1 and 4.27.
This looks similar to both #5607 (but we are not using classpath:) and #5724 (but we are not using any unnormalised relative paths).
The migrations do not start again from the beginning, but instead from version 6. When the migration is ran the database is at v18 and there should be only one migration that runs to take it to v19.
From what I can see it's because the old version of Liquibase used different tags/markers as part of the migration name than new Liquibase is, and in failing to find an exact match Liquibase decides the migration has never ran and tries to run it again:
The ":class-management" marker is what has always been in the SQL file, and the "raw" and "includeAll" are what old Liquibase had stored in the change log table:
where "raw" and "includeAll" are used as id/author.
Steps To Reproduce
As above
Expected/Desired Behavior
Does not run migrations that have already ran
Liquibase Version
No response
Database Vendor & Version
Postgres 15
Liquibase Integration
DropWizard
Liquibase Extensions
No response
OS and/or Infrastructure Type/Provider
No response
Additional Context
No response
Are you willing to submit a PR?
I'm willing to submit a PR (Thank you!)
The text was updated successfully, but these errors were encountered:
I can confirm that this is a problem, and it's most likely caused by the filepath processing - for 3.10.2, the filename is stored as <absolutePath>/migrations/filename, while for 4.25.0 and 4.27.0 it's stored as `migrations/filename'.
There is a fix for this problem already merged to the master branch, but not yet released as a new version. Would you be able to test this using a snapshot of the master branch?
Thanks for the update, @tati-qalified
I have tried this snapshot this morning but am seeing the same results. It seems Liquibase is still comparing the "raw/includeAll" (from the changelog in the DB) with "6/class-management" (from the changefile itself) and trying to run the migration again.
Search first
Description
Hello,
After updating Liquibase (from 3.10.2) we are finding that our migrations are now failing as Liquibase is attempting to re-run old migrations again. Observed this behaviour in 4.25.1 and 4.27.
This looks similar to both #5607 (but we are not using
classpath:
) and #5724 (but we are not using any unnormalised relative paths).Our entire changelog is simply this:
The migrations do not start again from the beginning, but instead from version 6. When the migration is ran the database is at v18 and there should be only one migration that runs to take it to v19.
From what I can see it's because the old version of Liquibase used different tags/markers as part of the migration name than new Liquibase is, and in failing to find an exact match Liquibase decides the migration has never ran and tries to run it again:
The ":class-management" marker is what has always been in the SQL file, and the "raw" and "includeAll" are what old Liquibase had stored in the change log table:
where "raw" and "includeAll" are used as id/author.
Steps To Reproduce
As above
Expected/Desired Behavior
Does not run migrations that have already ran
Liquibase Version
No response
Database Vendor & Version
Postgres 15
Liquibase Integration
DropWizard
Liquibase Extensions
No response
OS and/or Infrastructure Type/Provider
No response
Additional Context
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: