Simplified icon of a shield, resembling a police badge, with a star in the center

Policy Checks Commands

The liquibase checks command is a command group that allows you to customize and execute Policy Checks. It allows you to improve the quality of your database changes.

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

Note: If you have a checks settings file customized for a specific environment or project, you need to pass that using the --checks-settings-file parameter. If you do not include this parameter, Liquibase uses the default settings file: liquibase.checks-settings.conf. See Use the Checks Settings Configuration File.

Checks command

The liquibase checks command is a command group that lets you show, customize, and run policy checks. This command group contains several subcommands listed in the table on this page. For more information, see Get Started with the checks Command.

You can optionally use the --verbose parameter while using the checks run subcommand to expand the output to display a deeper level of detail about tables or other database objects checked. Outputs are listed below to show the difference between a --verbose output and a non --verbose output.

Usage syntax

liquibase checks <command> --check-name=<checkShortname>

It is important to note that command arguments must be placed after the specified policy check.

Checks commands list

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

Command Description
bulk-set

Sets all qualifying policy checks to the same value.

copy

Copies a customizable check so that you can run the same check multiple times with different parameters. Requires the --check-name attribute.

create

Creates a new YAML checks package file. Liquibase 4.25.0+.

customize

Allows you to customize checks specified in your check configurations. Requires the --check-name attribute.

delete

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

Disables a specific check provided in the --check-name attribute. The run command does not evaluate disabled checks when executed.

enable

Enables a specific check provided in the --check-name attribute. The run command evaluates enabled checks when executed.

reset

Reverts customizations made to the check indicated in the --check-name attributeto default settings. Does not affect static checks and uncustomized dynamic checks.

Note: When you reset a dynamic check that has been customized multiple times, the check reverts to its default settings, not to the previous customized settings.

run

Executes checks using the checks settings file and the changelog file you specify. Requires the --changelog-file attribute.

show

Prints the available checks and their configurations—as indicated in the checks settings file—to STDOUT.

You can read about parameters for these commands on their individual pages. To read about some complex parameters with their own pages, see Policy Checks Command Parameters.

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.

To validate that multiple types of objects in your database adhere to your naming conventions, use the Multiple Objects Policy Check. You can also format the output of your policy checks as JSON: see Policy Checks JSON Object. For a list of checks to run with commands, see Library of Policy Checks.