Deploy tab

If you are deploying with migration scripts, use the migrate command on the Migrations tab or learn more about using migrations as part of a pipeline.

Note: You will only see this tab on the side panel if:

  1. You are using one of the databases that have advanced comparison technology.  This includes SQL Server, Oracle, PostgreSQL, and MySQL. 
    And
  2. The project was created or later configured with the Deployment source = Schema model.   This cannot be set if the project contains migration scripts.


After you have saved any development database changes to the Schema model folder on disk, then you can use this tab to deploy those changes to other databases.


When you first come to this tab, the the page will look empty.  Use the Select target database drop down to select a target database.  If you don't see your target database in the list, use the Manage your environments option in the drop down to setup additional database connections.  


Once you select your target database, a list of all the objects that are different between your project's schema model on disk and the target database will be displayed.  This will also include any changes to static data.  You can choose what objects are ready for deployment.  Select the objects you want to deploy and click Deploy...


Flyway generates a deployment script and pulls in any necessary dependencies.  It will also show you any warnings as a result of the changes, e.g., there might be data loss.  You can review and edit the deployment script.  By default it will be marked to execute the entire script in a transaction unless the script contains changes that are not compatible with transactions.  You can change this setting or copy the script to the clipboard.  At this point, you may want to take a copy this script and save it in your repository so you have a record of what was run on each environment.  When ready, click Deploy now.  


Click Continue and deploy to run the script against the target database in the final confirmation dialog.


If there are any issues with your script, you'll see an error.  If not, you'll get a success message.


Learn more about Deploying from the Schema Model as part of a pipeline.


Pre & Post Deployment scripts, which will run on every state-based deployment, is on our backlog.  If you need this feature, please get in touch with our development team.  For now, you can workaround this by running your scripts before/after doing this deployment.  This can be automated in a CI/CD pipeline.



Didn't find what you were looking for?