flyway
flyway copied to clipboard
Overzealous warning when locations are configured per environment
Which version and edition of Flyway are you using?
10.19.0
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
CLI
Which database are you using? (Type & version)
SQL Server, but I'd be shocked if this issue had anything to do with DB vendor.
Which operating system are you using?
MacOS 14.6.1 (23G93), but running flyway docker container flyway/flyway:10.19.0
What did you do? (Please include the content causing the issue, any relevant configuration settings, the SQL statement(s) that failed (if any), and the command you ran)
I have chosen to configure locations per environment and not in the root flyway config.
e.g. flyway.toml
[flyway]
target = 'latest'
[environments.whatever]
flyway.locations = ["filesystem:/flyway/migrations/whatever"]
I can suppress the warning by setting a dummy value for flyway.locations:
[flyway]
# Override default locations to silence inaccurate warning. Actual locations
# are set per environment.
locations = ['ignored-and-overridden-per-environment']
target = 'latest'
[environments.whatever]
flyway.locations = ["filesystem:/flyway/migrations/whatever"]
What did you expect to see?
No warning of WARNING: No locations configured and default location 'sql' not found.
What did you see instead?
Warning of WARNING: No locations configured and default location 'sql' not found., however migrations are detected and run correctly.