Environment

Environment

Description

The name of the environment you wish Flyway to load configuration from. It points at the specific environment config with the same name.

This can be used to switch between multiple environments set in the TOML config file.

For more on the parameters that can be set inside the environment, see here.

Default

default

Usage

Commandline

./flyway -environment=env1 info

TOML Configuration File

[environments.env1]
url = "jdbc:h2:mem:flyway_db"
user = "myuser"
password = "mysecretpassword"

[flyway]
environment = "env1"

Environment Variable

flyway_environment=env1

Note: The environment variable has to be lower case

API

Flyway.configure()
    .environment("env1")   
    .load()

Didn't find what you were looking for?