Redgate Flyway

Tutorial - Run code review on migrations

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:

  1.  Code review before saving the migration script to your project, on the Generate migrations page.
  2.  After saving the migration script to your project, on the Migration scripts page.

  Running code review from the Migration scripts page

  1. Navigate to the Migration scripts page
  2. Connect to your target environment, by selecting the relevant connection from the Target database dropdown.
  3. Select Check from the command dropdown in the right hand pane
  4. Check the code flag under the command dropdown
  5. Click Run check



Didn't find what you were looking for?