Deploying database changes
Published 11 October 2021
Migration scripts can be manually deployed to target environments using the Migrate tab in Flyway Desktop.
For SQL Server and Oracle (and coming soon for PostgreSQL and MySQL), Redgate Deploy enables you to bring additional functionality into your pipelines by utilizing the command line or Docker containers for Redgate's industry-leading comparison engines:
With Flyway and the comparison commandlines, you may create rich pipelines complete with:
- Dry run scripts (flyway migrate /dryruns)
Have a record of the exact SQL that was executed on the target environments or use a manual intervention and approval step in your pipeline to review the SQL that will be executed on a target beforehand.
- Change reports (flyway check)
These reports show at a glance how many objects will change and what the change is. This can be useful during manual intervention and approval steps in your pipeline to understand exactly how each object will change and give DBAs a better understanding of the changes to determine if more review is needed.
- Drift reports (flyway check)
These reports show if there is a change in the target environment that did not flow through the pipeline.
- Rollback scripts (compare the target with the output of the build; see /Report and /ReportType: for SQL Server and Oracle)
This gives you a starting point to undo changes. If there's table or data manipulation involved, then you'll need to have better recovery plans in place like backups or you can think about generating Undo scripts.
- Code analysis reports
Run static code analysis checks to catch issues early. Rules can be turned on or off and have different severity levels (warning or error).
Be sure to review the Example CI/CD Pipelines to see how these work.
If you are looking to deploy from the schema-model for databases with object-level history support, see Deploying using the schema model.