Tutorial - Deploy pending migrations

Pre-requisites

  • Ensure that Flyway is installed and available on your path
  • Ensure that Flyway is authenticated to use enterprise features
  • Ensure that any secrets necessary for database connection auth are avaialbale

Commands to run

Ensure the target environment is baselined, or skip this step and append -baselineOnMigrate=true to the command in the next step

If your target environment, here with id production, is defined in your toml configuration run the following

flyway migrate -environment=production 

If you instead want to pass in the target connection information inline, instead run the following

flyway migrate "-url=<JDBC URL>"

Related command reference

Related configuration reference

  1. Navigate to the migrations tab
  2. Add a target database, to see exactly which scripts have been applied to that target, how long they took to execute, and what scripts are pending.
  3. Click View Dry Run script to see the exact deployment script, which concatenates all the pending scripts together, for that target database.
  4. Click Run migrate to execute the script on the target.




Didn't find what you were looking for?