Configuration
Published 26 October 2023
Configuration
Flyway has many different parameters that can be set to configure its behavior. These parameters can be set through a variety of different means, depending on how you are using Flyway.
Usage
Command Line
If using the command line, config parameters can be set via:
- Command line arguments
- e.g.
./flyway -url=jdbc:h2:mem:flyway info
- e.g.
- Configuration files
- Environment variables
- e.g.
FLYWAY_URL=jdbc:h2:mem:flyway
- e.g.
You can find out about the evaluation order of these mechanisms in CLI configuration order
API
If using the API, config parameters can be set via:
- Calling methods on the configuration object returned by
Flyway.configure()
- e.g.
Flyway.configure().url("jdbc:h2:mem:flyway").load()
- e.g.
- Configuration files
- Environment variables if the
.envVars()
method is called on the configuration object.
Maven
If using Maven, config parameters can be set:
- On the configuration XML block in the maven config
- Configuration files
- Environment variables
- e.g.
FLYWAY_URL=jdbc:h2:mem:flyway
- e.g.
Gradle
If using Gradle, config parameters can be set:
- In the plugin configuration block
- Configuration files
- Environment variables
- e.g.
FLYWAY_URL=jdbc:h2:mem:flyway
- e.g.
Resolvers
Values beginning with $
are treated as values to be resolved by resolvers. Resolvers are integrations with other value-storage systems such as Vault.
If you have a value starting with $
which is not something to be resolved, it can be escaped by starting it with $$
.
Further Details
- CLI Configuration Order
- Configuration Files
- Configuration from Standard Input
- Creating Regular Expression Rules
- Environment Variables
- Flyway Licensing
- License Permits
- Parameters
- Placeholders Configuration
- Property Resolvers
- Provisioners
- Script Configuration
- Secrets Management
- SSL support
- TOML Configuration File
- What is TOML