Check Changes

Check: Changes

Flyway Enterprise

This is available in Flyway CLI only

Description

This produces a report indicating differences between applied migration scripts on your target database and pending migrations scripts.

See also the Change Report Concept page

Usage

Commandline

./flyway check -changes -environment=prod -check.buildEnvironment=build
  • environment - This would typically be your target/production environment
    • If you can't access your target database from your build environment you should use check.appliedMigrations with the list of migrations that represent the current state if your target.
    • You could alternatively use a snapshot of your target database instead and tell Flyway to use this via check.deployedSnapshot
  • check.buildEnvironment - This is where Flyway will populate the database based on the migrations available

If you want to explicitly specify the filename of the generated report then the reportFilename parameter exists.

TOML Configuration File

Typically you would define the environments you want to work with in the TOML configuration file.

Alternatively you can configure some or all of the environments directly on the command line when calling Flyway.

Configuration File

Environments are not supported in .conf files so the build environment needs to be configured using the parameters:

For example:

flyway.check.buildUrl=jdbc:sqlserver://localhost:1433;databaseName=build;encrypt=false
flyway.check.buildUser=dbUser
flyway.check.buildPassword=password

Didn't find what you were looking for?