Deploying
Published 06 July 2022
There are a few options when deploying from Flyway Desktop:
- You can continue to deploy in a state-based method using SQL Compare / Schema Compare for Oracle. Use Flyway as a source and the database you want to update as your target.
- You can also start Generating migration scripts in Flyway Desktop for deployments and saving them in version control. Migration scripts give you more control over the deployment to do things like:
- Renaming tables/columns
- Splitting tables/columns
- Adding a new NOT NULL column with initial data that doesn't have a default
- Including other data updates in your deployment scripts
If you are considering Continuous Delivery, then we would recommend a migrations-based approach because the generated deployment scripts will be stored in version control alongside your database object changes and you'll have more control over the actual scripts that will be used for deployments.
Migrations-based deployments
You can Generate migrations directly in Flyway Desktop. In order to use a migrations-based approach, a Shadow Database is needed. The Shadow Database represents the end state of all the migration scripts already in the project. We then compare the schema-model on disk with this Shadow Database to determine what additional development changes should be included in the next migration script. You can selectively choose which changes are ready for deployment and customize the migration script, which gives you full control over the scripts that will be executed in deployments.
- Manual - Use the Migrations tab in Flyway Desktop to connect to a target database and migrate it.
- Automated - Use the Flyway command lines to automate the comparisons and deployments as part of your CI/CD systems. You can view the command line syntax using the Migrations tab in the Manual step above. You can then copy and paste this into your CI/CD system and setup any variables needed (e.g., Flyway license key, username, encrypted password for downstream environments, etc.). See our Example CI/CD Pipelines.
State-based deployments
- Manual - Use SQL Compare / Schema Compare for Oracle. Use Flyway as your source and specify a target database that you want to update. You can then generate a deployment script or deploy directly with SQL Compare.
- Automated - Use the SQL Compare / Schema Compare for Oracle command line to automate the comparisons and deployments as part of your CI/CD systems. You can learn more about these Database DevOps Practices.
- SQL Change Automation extensions and PowerShell will still work while our support continues, but eventually (current plan end of 2025) we will retire these in support of the Flyway CLI. We are working to automate state-based deployments as part of the Flyway CLI in 2024. If you have any questions, please get in touch with our Database DevOps Team.
- If you were already automating your deployments from a SQL Source Control / Source Control for Oracle repository, make sure to update the version control location so the source matches the new schema-model folder where your database object DDL has been moved to. This should be a one-time change and then the rest of your CI/CD processes should work since the underlying technology of Flyway Desktop is using the same Redgate comparison technology .
Learn more about Deploying database changes using Flyway.
Any Questions?
If you have any questions about transitioning, please get in touch with Sales.