What are policy check commands?
Checks command
The liquibase checks command group helps you manage and run policy checks to improve the quality of your database changes.
How It Works
Policy checks evaluate your database changes against configurable rules. You can customize these checks, enable or disable them, and run them as part of your deployment workflow to catch potential issues early.
Configuration storage: All customizations to your checks are saved in a checks settings file. By default, Liquibase uses liquibase.checks-settings.conf. If you've created environment-specific or project-specific settings files, specify them using the --checks-settings-file parameter when running commands.
Available Commands
The liquibase checks command group includes several subcommands for managing your policy checks (see table below). Each command accepts specific arguments to control its behavior.
Example: Getting detailed output
When running liquibase checks run, you can add the --verbose parameter to see more detailed information about which tables or database objects were checked. Without --verbose, you'll see a summary. With --verbose, you'll see granular details about each object evaluated.
Usage syntax
liquibase checks <command)liquibase checks <command> --check-name=<checkShortname>The check short name can be anything you want it to be customized to. If you don't specify a checkShortname, Liquibase will generate one automatically for you use.
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.
Policy check command parameters
Policy check parameters are Liquibase configuration settings that control the overall behavior of the Policy Checks feature across all commands. These are global settings you configure once, typically in your liquibase.properties file or as environment variables. Unlike command arguments, which you specify each time you run a command, parameters define the underlying configuration that persists across your Policy Checks workflow.
Parameter syntax | |
|---|---|
CLI and Flow files |
|
liquibase.properties file and |
|
Environment variable |
|
Troubleshooting
If you try to run a checks command without having the Liquibase Checks Extension installed, Liquibase may display this message:ERROR: No checks command performed because Liquibase Checks Extension is required with this version of Liquibase. Visit /pro/integration-guide-4-33 to acquire the Checks Extension.In Liquibase 4.31.0 and later, the Checks Extension is included when you download Liquibase. If you accidentally removed the checks JAR from your /internal/lib folder, you can download a replacement Checks Extension JAR from Maven Central.