Quality Checks Commands

To execute the Quality Checks and improve the quality of your database changes, you can use the checks command group including checks subcommands.

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

Command

Description

liquibase checks
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.

liquibase checks customize

The customize subcommand allows you to customize checks specified in your check configurations. It requires the --check-name parameter.

liquibase checks
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.

liquibase 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.

liquibase checks
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.

liquibase checks
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.

liquibase checks
run

The run subcommand executes checks using the checks settings file and the changelog file you specify. It requires the --changelog-file parameter.

liquibase checks
show

The show subcommand prints the available checks and their configurations as indicated in the check settings file to STDOUT.

checks command group parameters

There are subcommands that require or accept parameters. Those parameters are:

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

The parameter which specifies the needed checks settings file to work with subcommands.

For more information, see checks settings file.

check-name

CLI:

--check-name

Property:

liquibase.command.checks.<subcommand>.checkName

Environment Variable:

LIQUIBASE_COMMAND_CHECKS_<subcommand>_CHECK_NAME

The parameter which you must specify so that any of the following subcommands being executed can perform its function:

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

CLI:

--changelog-file

Property:

liquibase.command.checks.run.changelogFile

Environment Variable:

LIQUIBASE_COMMAND_CHECKS_RUN_CHANGELOG_FILE

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