run

The run subcommand executes checks using the checks settings file and the changelog file you specify. Quality checks support XML, SQL, YAML, and JSON changelog formats.

Uses

You can typically use the run command to run static and dynamic checks with the changelog and configuration files having default and non-default locations.

If your files are not stored in the Liquibase working directory, specify the relative path to them. Check How Liquibase Finds Files: Liquibase Search Path for more details.

Note: To view a list of available checks, run liquibase checks show.

Running the run command

Run the command specifying your values:

liquibase checks run --changelog-file=basicRule.postgres.sql

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.

The command runs the check and generates related information in the CLI output.

Attributes

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.run.checksSettingsFile

Environment Variable: LIQUIBASE_COMMAND_CHECKS_RUN_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.run.checkName

Environment Variable: LIQUIBASE_COMMAND_CHECKS_RUN_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.run.changelogFile

Environment Variable: LIQUIBASE_COMMAND_CHECKS_RUN_CHANGELOG_FILE

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

auto-update

CLI: --auto-update=[on|off]

Property: liquibase.command.checks.run.autoUpdate: [on|off]

Environment Variable: LIQUIBASE_COMMAND_CHECKS_RUN_AUTO_UPDATE=[ON|OFF]

Allows automatic backup and updating of the liquibase.check-settings.conf file when new quality checks are available.

Default: off

format

CLI: --format=[text|json]

Property: liquibase.command.checks.run.format: [text|json]

Environment Variable: LIQUIBASE_COMMAND_CHECKS_RUN_FORMAT=[TEXT|JSON]

Liquibase Pro only. Sets the format of the check output to text or JSON.

Default: text

For more information, see Quality Checks JSON Object .

Related links