validate command checks and identifies any possible errors in a changelog that may cause the
update command to fail.
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.
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
- There are no checksum errors
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 Specifying Properties in a Connection Profile. You can also specify these properties in your command line.
Then run the
liquibase --changelog-file=oracle_runWith_changelog.xml validate
Note: Enter the name of the changelog you want to use in place of
validate global attributes
Tip: All commands and parameters use the
--kebab-case format in the CLI environment. This is the format Liquibase recommends for best results. If your preference is camelCase, it will still work in the CLI.
||The root changelog||Required|
||The JDBC database connection URL||Required|
||The database username||Required|
||The database password||Required|
* Liquibase will check nested changelogs for definitions of the changesets to validate.
password attributes are not required for connections and systems which use alternate means of authentication.
Liquibase Version: 4.9.1 Liquibase Community 4.9.1 by Liquibase No validation errors found. Liquibase command 'validate' was executed successfully.