Reviewing deployment script ahead of deployment
Published 17 September 2025
The flyway prepare command allows you to review the deployment script before updating a target database. This is helpful if there's a manual review step as part of your CI/CD pipeline.
Note that the deployment script does not contain transaction blocks as transactions are handled in the execution logic, via deploy or migrate. Similarly, callbacks do not appear in the deployment script as they hook into the execution logic.
It can be helpful to use this in conjunction with a deployment changes report, which can give a more digestible view of how each object has changed.
State-based deployments
flyway prepare is an inherent part of the recommended approach for state-based deployment.
See the manual deployment tutorial or common state-based deployment scripts for automated deployment for examples.
Migrations-based deployments
It can be less necessary to have a manual deployment review for migrations, as the migration scripts themselves effectively constitute the deployment script and can be reviewed at development time.
In order to view the script that will be deployed, either the prepare command or a dry run of the migrate command can be used to generate a dry run script.
Relevant tutorials