Redgate Flyway

For PostgreSQL users - where are your DBs hosted?

Connecting to environments

Environments can be configured using Flyway Desktop or by editing the TOML confuguration file directly. The reference information for all possible environment-specific configurations can be found here.

Certain connection types may require additional steps.

Adding to the classpath

Flyway ships with support for a large number of databases and functionality, but due to limitations (such as licensing) it can't ship containing everything it supports. In these situations, Flyway will load the extra support/functionality if it is present on the classpath. The most common libraries to be added to Flyway is those that add JDBC driver support. For example the Informix database is supported by Flyway, but the JDBC driver is not shipped with it. Therefore the com.ibm.informix:jdbc:4.10.10.0 dependency needs to be added to the classpath to allow Flyway to work with it. See the database driver reference for more information and see this tutorial for more guidance on how to add items to the classpath.

Configuring SSL

Maintaining a secure connection to your database is highly desirable in a production environment, even if not already enforced by the database configuration. Flyway can be configured to use SSL to establish a secure connection as and when required, provided the relevant database and JDBC driver also support SSL. See this tutorial for more guidance.

SSL in Docker

Using SSL with the Flyway Docker image is a little more involved, as you will need to get the certificate into the container you ultimately run.

If you wish to do this, we can recommend an excellent guide by Joao Rosa who follows the process through step by step.

SQL Server Local DB

LocalDB uses named pipes for connections, and the official Microsoft SQL Server JDBC driver doesn't support LocalDB named pipes - see this Github issue.

LocalDB connections can instead be made using the jTDS driver, but there are a couple of important caveats to note:

  • The jTDS driver only supports named pipes when connecting to LocalDB - you can read more about this limitation in this GitHub issue. This means that the instance name for your LocalDB will change every time the service is restarted, which would mean you have to edit your connection string every time too. To avoid this, Flyway supports deferred resolution of the instance using a Local DB resolver.
  • With jTds SQL Server authentication works out of the box, but for Windows Authentication to work an additional dll, ntlmauth.dll, needs to be downloaded, as well as setting the domain property in the JDBC URL.
  • jTds does not support using localhost as a server name. Use .  instead.

For more guidance see this tutorial.

Relevant tutorials


Didn't find what you were looking for?