validate command checks and identifies any possible errors in a changelog that can cause the update command to fail.
validate command is mainly used when you want to detect if there are any issues with a changelog before running the update command.
With the help of the
validate command, you can avoid a partial update, where only some changesets are applied due to an error in your changelog file.
validate command to ensure that:
- The XML/YAML/JSON/formatted SQL is structured correctly
- Referenced files can be found
- There are no duplicated id/author/file combinations
- There aren't any checksum errors
- Any required or not allowed attributes are correct for your database
Running the validate command
To run the
validate command, you can specify the driver, classpath, and URL in your
liquibase.properties file. For more information, see Creating and configuring a liquibase.properties file. You can also specify these properties in your command line.
Then run the
liquibase --changeLogFile=oracle_runWith_changelog.xml validate
Note: Enter the name of the changelog you want to use in place of
validate global attributes
||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.
c:\dev\DaticalDB-testing\liquibase-pro-cli-project\oracle_lbpro_master>..\liquibase --logLevel=error --changeLogFile=oracle_runWith_changelog.xml validate 10:36:04.616 INFO [liquibase.integration.commandline.Main]: Liquibase Pro 3.8.10-DAT-4254-SNAPSHOT by Datical licensed to Liquibase Pro Customer until Tue Nov 03 19:00:00 CST 2020 10:36:07.390 INFO [liquibase.integration.commandline.Main]: No validation errors found. 10:36:07.395 INFO [liquibase.integration.commandline.Main]: Liquibase command 'validate' was executed successfully.