Environment Flyway Namespace
Published 15 January 2025
There are configuration settings that can be defined for all Flyway invocations. However, there are instances where you may want more fine-grained control to specify this for a specific environment.
For example, changing cleanDisabled
may be appropriate for your test environment but not for your production environment.
Override exceptions
All settings in the Flyway namespace which can be configured in a TOML configuration file can be overridden at the environment level except the following:
Excluded settings:
Settings within child namespaces of the flyway namespace (such as flyway.oracle
) cannot be overridden.
Usage examples
Command-line
-environments.test.flyway.locations=location4
TOML Configuration file
[flyway]
environment = "test"
locations = ["location1"]
[environments.test]
url = "jdbc:\\..."
[environments.test.flyway]
locations = ["location2","location3"]
Environment Variable
Environment overrides do not have dedicated environment variable support