snowdrop-zen / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
1 stars 0 forks source link

Flyway filesystem location not supported #215

Closed snowdrop-bot closed 3 years ago

snowdrop-bot commented 3 years ago

Describe the bug Any filesystem location added to the quarkus.flyway.locations property is ignored

Expected behavior Adding a filesystem:/path to the property must make flyway aware of the sql migration files located there, like documented:

quarkus.flyway.locations

Comma-separated list of locations to scan recursively for migrations.
The location type is determined by its prefix.
Unprefixed locations or locations starting with classpath: point to a package on the classpath and may contain both SQL and Java-based migrations.
Locations starting with filesystem: point to a directory on the filesystem, may only contain SQL migrations and are only scanned recursively down non-hidden directories.

Actual behavior The filesystem locations are ignored

To Reproduce

Steps to reproduce the behavior:

  1. Enable the Flyway extension
  2. Add the quarkus.flyway.locations to the application.properties with a value filesystem:/path where the path is pointing to a folder with sql files in it
  3. Execute Quarkus, the log will report only the classpath locations

Configuration

quarkus.flyway.locations=db/migration,filesystem:/deployments/scripts

Environment (please complete the following information):

Additional context After some debugging I noticed that the method FlywayProcessor.discoverApplicationMigrations() in the flyway extension discards any location that is not resolvable with the class loader


https://github.com/quarkusio/quarkus/issues/13421


$upstream:13421$