documentation/Reference/Configuration/Environments Namespace/Environment URL Setting.md
The jdbc url to use to connect to the database.
Note: Only certain jdbc drivers are packaged with flyway. If your driver is not packaged, then you need to ensure it is available on the classpath (see Adding to the classpath).
String
<i>none - this is required</i>
This can be set from the connection dialog.
./flyway -url=jdbc:h2:mem:flyway_db info
To configure a named environment via command line when using a TOML configuration, prefix url with
environments.{environment name}. for example:
./flyway -environments.sample.url=jdbc:h2:mem:flyway_db info
[environments.default]
url = "jdbc:h2:mem:flyway_db"
flyway.url=jdbc:h2:mem:flyway_db
FLYWAY_URL=jdbc:h2:mem:flyway_db
When using the Java API, you configure your JDBC URL, User and Password via a datasource.
Flyway.configure()
.datasource("jdbc:h2:mem:flyway_db", "myuser", "mysecretpassword")
.load()
flyway {
url = 'jdbc:h2:mem:flyway_db'
}
<configuration>
<url>jdbc:h2:file:./target/foobar</url>
</configuration>