Quality Checks Commands

To execute quality checks and improve the quality of your database changes, use the checks command group and subcommands.

Tip: If you use Maven, see Maven checks.show and Maven checks.run.

To validate that multiple types of objects in your database adhere to your naming conventions, use the Multiple Objects Quality Check .

If you have Liquibase Pro, you can format the output of your quality checks as JSON. For more information, see Quality Checks JSON Object .

For more information about using quality checks, see Working with Quality Checks .

checks command

The liquibase checks command is a command group with subcommands that let you customize and execute quality checks.

  • Subcommands require specific parameters noted in the table.
  • Customizations to checks configuration are stored in the checks settings file.

checks subcommands

Subcommand

Description

copy The copy subcommand copies a customizable check so that you can run the same check multiple times with different parameters. It requires the --check-name parameter.
customize The customize subcommand allows you to customize checks specified in your check configurations. It requires the --check-name parameter.
delete The delete subcommand allows you to delete a copy of a check from your checks settings. You cannot delete static checks and parent dynamic checks used to create copies of checks.
disable The disable subcommand disables a specific check provided in the --check-name parameter. The liquibase run checks command does not evaluate disabled checks when being executed.
enable The enable subcommand enables a specific check provided in the --check-name parameter. The liquibase run checks command evaluates enabled checks when being executed.
reset

The reset subcommand reverts customizations made to the check indicated in the --check-name parameter to default settings. This subcommand does not affect static checks and uncustomized dynamic checks.

Note: When resetting a dynamic check that has been customized multiple times, the check will be reverted to default settings and not to the previous customized settings.

run The run subcommand executes checks using the checks settings file and the changelog file you specify. It requires the --changelog-file parameter.
show The show subcommand prints the available checks and their configurations as indicated in the check settings file to STDOUT.
bulk-set The bulk-set command sets all qualifying quality checks to the same value. The command is a Liquibase Pro command, so you need a valid Liquibase Pro License Key to use it.

checks command group parameters

The following table identifies parameters that are accepted or required by some subcommands.

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

Name Syntax Description
checks-settings-file

CLI: --checks-settings-file

Property: liquibase.command.checks.<SUBCOMMAND>.checksSettingsFile

Environment Variable: LIQUIBASE_COMMAND_CHECKS_<SUBCOMMAND>_CHECKS_SETTINGS_FILE

Specifies the checks settings file to use with subcommands.

Write the relative path of the settings file that you want to read from or modify.

For more information, see Using the Checks Settings Configuration File .

check-name

CLI: --check-name

Property: liquibase.command.checks.<SUBCOMMAND>.checkName

Environment Variable: LIQUIBASE_COMMAND_CHECKS_<SUBCOMMAND>_CHECK_NAME

Use this to specify the short name of the check you want to target with one of the following subcommands:

  • copy
  • customize
  • delete
  • disable
  • enable
  • reset
  • run
changelog-file

CLI: --changelog-file

Property: liquibase.command.checks.<SUBCOMMAND>.changelogFile

Environment Variable: LIQUIBASE_COMMAND_CHECKS_<SUBCOMMAND>_CHANGELOG_FILE

The changelog file against which you execute checks when running liquibase checks run.