checks run command

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 checks 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 Classpath for more details.

Note: To see the list of available checks, run liquibase checks show.

Running the checks run command

Run the command specifying your values:

liquibase checks run --changelog-name=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 will execute the check and provide you with the information about it in the CLI output.

checks copy command attributes

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.

Set the checks-settings-file parameter to the relative path of the checks-settings-file that you want to read from or modify.

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

Set the check-name parameter to the short name for the check you want to target with one of the subcommands.

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.

Related links