-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
changeset with relative path deployed with liquibase 4.6.0 to 4.23.1 are replayed with liquibase > 4.23.1 #5724
Comments
With an empty database and liquibase 4.26.0, the databasechangelog is :
For me, this PR is the root cause : #5141 I can submit a PR with this change : filePath = Paths.get(filePath).normalize().toString().replace("\\", "/");
return filePath;
} revert isSamePath in RunChangeSet like this : private boolean isSamePath(String filePath) {
String normalizedFilePath = DatabaseChangeLog.normalizePath(this.getChangeLog());
return normalizedFilePath.equalsIgnoreCase(DatabaseChangeLog.normalizePath(filePath));
} @filipelautert does it make sense to you ? liquibase/liquibase-standard/src/test/groovy/liquibase/changelog/DatabaseChangeLogTest.groovy Lines 745 to 757 in d224b5b
|
Hello @jgarec ! The idea behind method |
Btw, there is another PR going around the same piece of code: #5682 , I believe it will be good to handle those 2 problems together or we may face conflicts. |
thx for your feedback @filipelautert, I've check the other PR. |
* fixes #5724: compare normalized file paths * fix: windows path should be corrected after calling OS aware Paths method * chore: copy test to validate issue 5681 * chore: we really need to replace it twice.... --------- Co-authored-by: filipe <flautert@liquibase.org>
Search first
Description
We have changeset with relativePath. They were deployed with liquibase 4.8.0 (but all versions between 4.6.0 and 4.23.0 are concerned).
When we tried to upgrade to liquibase 4.24.0 (same result with 4.25 & 4.26), these changesets were replayed.
Steps To Reproduce
I use docker for this :
# Start a postgres database docker run -d --rm -it --name postgres -e POSTGRES_USER=myusername -e POSTGRES_PASSWORD=mypassword -p 5412:5432 postgres:12
Expected/Desired Behavior
we expect :
Liquibase Version
Database Vendor & Version
offline, postgresql
Liquibase Integration
cli, docker, build with source code
Liquibase Extensions
No response
OS and/or Infrastructure Type/Provider
linux
Additional Context
create changelog-master.yaml file
create a model directory and add changelog-table.yaml file
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: