validate

The validate command checks and identifies any possible errors in a changelog that may cause the update command to fail.

Uses

Use the validate command to detect if there are any issues with a changelog before running the update command. Validation helps you avoid a partial update, where only some changesets are applied due to an error in your changelog file.

Use the validate command to ensure:

  • The XML, YAML, JSON, or formatted SQL is structured correctly
  • Referenced files can be found
  • Any required or prohibited attributes are correct to your database
  • There are no duplicated id, author, and file combinations
  • There are no checksum errors

Note: The validate command only looks for possible errors in the changelog, it does not check for possible errors that might result from applying the changes to a specific database.

Running the validate command

To run the validate command, specify the driver, classpath, and URL in the Liquibase properties file. For more information, see Create and Configure a liquibase.properties File. You can also specify these properties in your command line.

Then run the validate command:

liquibase --changelog-file=oracle_runWith_changelog.xml validate

Note: Enter the name of the changelog you want to use in place of oracle_runWith_changelog.xml.

validate global attributes

Tip: For best results, specify all commands and parameters in the --kebab-case format in the CLI. If your preference is camelCase, it also works in the CLI.

Attribute Definition Requirement
--changelog-file *

The root changelog

Required
--url

The JDBC database connection URL

Required
--username

The database username

Required
--password

The database password

Required

* Liquibase will check nested changelogs for definitions of the changesets to validate.

Note: The username and password attributes are not required for connections and systems which use alternate means of authentication.