Provisioning

Using the available provisioners, you can provision a database which does not exist yet before connecting to it, or reprovision the shadow database, restoring the database back to a known state.

Flyway Desktop currently supports Redgate Clone provisioning and Docker provisioning via the UI. They can be selected using the dropdown in the database connection dialog. The clean provisioner is used under the hood as the default behaviour for the shadow database.

These are available in Preview.  If you are trying to use this feature or have feedback about this feature, please get in touch with our Database DevOps Development Team.

Redgate Clone - Preview

EDITION: ENTERPRISE

For the list of database types supported by Redgate Clone see here.

This provisioner allows for the provisioning and reprovisioning of databases using Redgate Clone.

Prerequisites:

  • A Redgate Clone server needs to be set up
  • The image to use for generating the clone needs to already exist on the clone server
  • For the use case of replacing the baseline migration script, the image must contain a flyway schema history table, so it is recommended to run baseline on your target database before capturing the image. This use case is more fully described here.

The following properties have to be configured:

  • url - The Redgate Clone server URL
  • dataImage - The data image to use for creating the container
  • dataContainer - The data container to use for the database clone
  • dataContainerLifetime - The lifetime of the data container. This takes the form of a number optionally followed by a time unit, s, m, h, or d. If no time unit is specified, seconds are assumed. 0 can be used to set the lifetime to be unlimited.
  • authenticationToken - The token required for authenticating with the Redgate Clone Server. It is recommended to store this as a secret and resolve it using an appropriate property resolver.


Please note that when testing connection or subsequently whenever the clone needs reprovisioning there may be a delay of up to a minute while the provisioning takes place. The time is dependent on speed of connection to Clone Server, but should be equivalent for any size of database.

A very common use case is to use Redgate Clone to avoid needing to generate a baseline migration script but it is also possible to use this for other databases, for example in order to generate a development database similar to production.

Docker - Preview

EDITION: ENTERPRISE

This provisioner allows for the provisioning and reprovisioning of databases using Docker, specifically leveraging the Docker compose functionality.

Prerequisites:

  • Either create or use an existing Docker compose file, which defines one or more services which will provision a database

The following properties have to be configured:

  • composeFile - The Docker compose file to use
  • services - The relevant services exposed by the Docker compose file
  • waitTimeout - The Docker wait timeout. This takes the form of a number optionally followed by a time unit, s, m, h, or d. If no time unit is specified, seconds are assumed.

After populating these fields, you then need to set your database connection as normal.

Please note that when testing connection or subsequently whenever the database needs reprovisioning there may be a slight delay while the provisioning takes place.

For an extended example of how to set this up see here.


Didn't find what you were looking for?