Redgate Flyway

Tutorial - Configure the shadow database

  1. If no shadow database is configured, you will be prompted to configure it from the GUI when navigating to the Generate Migrations tab.
  2. From this screen you can enter the connection details for your shadow database, including authentication type and credentials.
    By default, your password is stored in your operating systems built-in credential storage tool.
    By default, your shadow database information is stored to the user settings. This is useful if you have a dedicated shadow database.  If everyone on your team is using the same shadow database, then choose to save the database information to the project settings, although note that this is generally not recommended, as you can get problematic behaviour if multiple developers try and update the shadow database at once.

    When setting the shadow database/schema connection, ensure it isn't an important database/schema as this may be cleaned and rebuilt when generating migration scripts in Flyway Desktop.  There is a checkbox that you must explicitly click to confirm that all the data and schema in the shadow database can be erased.  You will also need to make sure that you have sufficient permissions to clean the database/schema.

  3. Click Test connection or Test and save to close the dialog and start tracking changes to your development database.
  4. Once it is configured, the connection details can be altered via the Settings Cog, which will display the following options.


Some users like to name their shadows as z_<DbName>_shadow_<DevName>.  This is especially true on a shared centralized development server so all these databases appear at the end of the list.  If you are using SQL Server and SSMS, you can filter out and databases whose name contain "_shadow" from the Object Explorer view.

You can add a shadow database environment configuration to your toml configuration file or user configuration file as follows:


Next steps

Pick one of:

  • Validate migration deployment
  • Generate migrations (note that this validates migration deployment as part of comparing against migrations)
  • Baseline (prerequisite for generating migrations if you do not have any yet, unless working on a completely greenfield database)



Didn't find what you were looking for?