-
Notifications
You must be signed in to change notification settings - Fork 2.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
fix(flyway): multiple datasource migration does not work on native #8065
Conversation
The QuarkusPathLocationScanner returned all migrations locations by default, this risked to cause collision when we have a same filename for a migration script which is handled by different datasources - a behaviour encountered on the issue quarkusio#7685. Let's avoid this case by making sure that the scanner only returns migration that it can recognize. Fixes quarkusio#7685
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a couple of suggestions, not all related to your change though.
extensions/flyway/deployment/src/main/java/io/quarkus/flyway/FlywayProcessor.java
Outdated
Show resolved
Hide resolved
extensions/flyway/deployment/src/main/java/io/quarkus/flyway/FlywayProcessor.java
Show resolved
Hide resolved
...flyway/runtime/src/main/java/io/quarkus/flyway/runtime/graal/QuarkusPathLocationScanner.java
Outdated
Show resolved
Hide resolved
extensions/flyway/deployment/src/main/java/io/quarkus/flyway/FlywayProcessor.java
Show resolved
Hide resolved
Thanks @machi1990 ! |
@machi1990 btw, we have the same weird pattern of writing files in the Liquibase extension. Maybe we could get rid of it too? |
Sure, I'll look at it. Thanks for the review 👍 |
The QuarkusPathLocationScanner returned all migrations locations by default, this risked to cause
collision when we have a same filename for a migration script which is handled by different
datasources - a behaviour encountered on the issue #7685. Let's avoid this case by making sure that
the scanner only returns migration that it can recognize.
Fixes #7685
/cc @yanxuehe this should fix the issue for you.