Configuring the development database

Flyway Desktop will prompt you to link a development database if this hasn't already been set up.

Click Link development database.

From this screen you can enter the connection details for your development database, including authentication type and credentials.  By default, your password is stored in your operating systems built-in credential storage tool (Credential Manager on Windows and Keyring on Linux).  

By default, your development database information is stored to the "user settings".  These are not committed to Git.  This is useful if you have a dedicated development database.  If everyone on your team is using the same development database, then choose to save the database information to the "project settings".  This is committed to Git and will be shared with team members.  They will only need to enter their credentials (if needed).   

Click Test connection or Test and save to close the dialog and start tracking changes to your development database..

If needed, you can change your development database details by clicking on the blue settings cog in the upper right corner.
 

SQL Server LocalDB

To use localDB, you will need to use a fork of the jdbc driver. This is because LocalDB uses named pipes for connections, and the official Microsoft SQL Server JDBC driver doesn't support LocalDB named pipes - see this Github issue.

You will need to use the jTds driver:

  1. You can download the driver here. After extracting it, you will need to move jtds.1.3.3.jar to <install_dir>/flyway/drivers, and delete the existing jtds-1.3.1.jar.
  2. Selected jTds using the driver dropdown in the connection dialog

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 Desktop supports deferred resolution of the instance by setting the instance to ${localdb.pipeName} in the JDBC URL. This is controlled by the "local db" checkbox in the UI, which is checked by default when selecting jTds from the driver dropdown. Note that namedPipe also needs to be set to true in the JDBC URL for this to work (again on by default). The default localdb instance name (for entering into the instance name field) is "MSSQLLocalDB". You can read more about localdb resolution here.
  • 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. The ntlmauth.dll needs to be added to <install_dir>/flyway/native. It can be downloaded here.
  • jTds does not support using localhost as a server name. Use .  instead.

Provisioning

If you want to generate a new populated development database, it is possible to provision one.

A common use case is to generate a development database based upon a sanitized clone or backup of production.


Didn't find what you were looking for?