question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Flyway migrations of defined locations are not applied anymore

See original GitHub issue

Describe the bug I want to use different database migrations with flyway for testing. I defined two different locations for the flyway migrations in the application.properties:

%test.quarkus.flyway.locations=classpath:/db/migration/,classpath:/db/testing/

Expected behavior I expect that all migrations in the folders migration and testing are applied

Actual behavior Only the migrations in the migration folder are applied, anything in testing is ignored.

To Reproduce Steps to reproduce the behavior:

  1. Use quarkus-flyway version newer than 1.4.2
  2. Define non-default location for flway migrations (quarkus.flyway.locations)
  3. Start application, only migrations in default path are applied

Configuration

quarkus.datasource.driver=org.postgresql.Driver
quarkus.datasource.username = ${POSTGRES_USER:postgres}
quarkus.datasource.password = ${POSTGRES_PASSWORD:postgres}
quarkus.datasource.url = ${POSTGRES_URL:jdbc:postgresql://localhost:5432/postgres}
quarkus.flyway.migrate-at-start=true
quarkus.swagger-ui.always-include=true

%test.quarkus.http.test-port=0
%test.quarkus.datasource.driver=org.testcontainers.jdbc.ContainerDatabaseDriver
%test.quarkus.hibernate-orm.dialect=org.hibernate.dialect.PostgreSQL9Dialect
%test.quarkus.datasource.url=jdbc:tc:postgresql:latest:///postgres
%test.quarkus.flyway.migrate-at-start=true
%test.quarkus.flyway.clean-at-start=true
%test.quarkus.flyway.locations=classpath:/db/migration/,classpath:/db/testing/

Environment (please complete the following information):

  • Output of uname -a or ver: Darwin Henriks-MBP-3.fritz.box 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64
  • Output of java -version: openjdk version “13.0.1” 2019-10-15 OpenJDK Runtime Environment (build 13.0.1+9) OpenJDK 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)
  • GraalVM version (if different from Java): -
  • Quarkus version or git rev: 1.5.2
  • Build tool (ie. output of mvnw --version or gradlew --version): Maven home: /usr/local/Cellar/maven/3.6.3_1/libexec Java version: 13.0.2, vendor: N/A, runtime: /usr/local/Cellar/openjdk/13.0.2+8_2/libexec/openjdk.jdk/Contents/Home Default locale: en_DE, platform encoding: US-ASCII OS name: “mac os x”, version: “10.15.5”, arch: “x86_64”, family: “mac”

Additional context This is working in version 1.4.2.Final of quarkus-flyway but not with the newer ones.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
henrikengelbrinkcommented, Jul 14, 2020

Thank you @geoand

1reaction
geoandcommented, Jul 14, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Flyway - Cannot find migrations location in - Stack Overflow
1. Migrations in src/main/kotlin/db/migration should be found by the default location of classpath:db/migration as the code in src/main/kotlin/ ...
Read more >
Release Notes - Flyway by Redgate • Database Migrations ...
Fix relative locations not being relative to the working directory; Issue 3444 When using the delimiter keyword the value can be placed on...
Read more >
Database Migrations with Flyway - Baeldung
Within a single migration run, repeatable migrations are always applied last, after pending versioned migrations have been executed. Repeatable ...
Read more >
sbt flywayMigrate - Flyway by Boxfuse • Database Migrations ...
Parameter Required Default flywayUrl YES flywayDriver NO Auto‑detected based on url flywayUser NO
Read more >
Flyway (flyway-core 5.1.3 API) - Javadoc.io
java.lang.Object. org.flywaydb.core.Flyway. All Implemented Interfaces: Configuration ... Retrieves the locations to scan recursively for migrations.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found