documentation/Reference/Commands/Validate.md
Validates the applied migrations against the available ones.
Validation fails if
Validate works by storing a checksum (CRC32 for SQL migrations) when a migration is executed. The validate mechanism checks if the migration locally still has the same checksum as the migration already executed in the database.
See Flyway Schema History Table for more information.
flyway validate
mvn flyway:validate
Note that default phase is pre-integration-test.
gradle flywayValidate
Universal commandline parameters are listed here.
All relevant configuration settings are listed here. The settings from these sections can be set as parameters on the validate command:
It is also possible to set environment settings as parameters.
All parameters are optional, although a target environment must be configured or passed in.
{
"errorDetails": null,
"invalidMigrations": [],
"validationSuccessful": true,
"validateCount": 2,
"flywayVersion": "{{ site.flywayVersion }}",
"database": "testdb",
"warnings": [],
"operation": "validate"
}
This command can produce the following error codes: