Tutorial - Run code review on migrations
Published 16 September 2025
Prerequisites
- Ensure that Flyway is installed and available on your path
- Ensure that Flyway is authenticated to use enterprise features
- Or you have SQLFluff installed and configured to use at Community
- Ensure that any secrets necessary for database connection auth are available
Commands to run
If your target environment and build environment, here with id production and id build respectively, are defined in your toml configuration run the following
flyway check -code
Related command reference
You can run code review on migration scripts to view code violations in two situations:
- Code review before saving the migration script to your project, on the Generate migrations page.
- After saving the migration script to your project, on the Migration scripts page.
Running code review from the Migration scripts page
- Navigate to the Migration scripts page
- Connect to your target environment, by selecting the relevant connection from the Target database dropdown.
- Select Check from the command dropdown in the right hand pane
- Check the code flag under the command dropdown
- Click Run check