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.
copy
command attributes
Tip: All commands and parameters use the --kebab-case
format in the CLI environment. This is the format Liquibase recommends for best results. If your preference is camelCase, it will still work in the CLI.
Name | Syntax | Description |
---|---|---|
checks-settings-file
|
CLI:
Property:
Environment Variable:
|
The parameter which specifies the needed checks settings file to work with subcommands. Set the For more information, see Using the Checks Settings Configuration File. |
check-name
|
CLI:
Property:
Environment Variable:
|
The parameter which you must specify so that any of the following subcommands being executed can perform its function:
Set the |
changelog-file
|
CLI:
Property:
Environment Variable:
|
The changelog file against which you execute checks when running liquibase run . |
auto-update
|
CLI: Property: Environment Variable: |
The parameter which allows automatic backup and updating of the Default: off |
format
|
CLI: Property: Environment Variable: |
Liquibase Pro only. Sets the format of the check output to text or JSON. Default: text For more information, see Quality Checks JSON Object. |

run
example output
Starting Liquibase at 13:53:58 (version 4.9.1 #1978 built at 2022-03-28 19:39+0000)
Liquibase Version: 4.9.1
Executing Quality Checks against example-changelog.sql
Executing all checks because a valid Liquibase Pro license was found!
Changesets Validated:
ID: 1; Author: Amber.Williams; File path: example-changelog.sql
ID: 2; Author: Amber.Williams; File path: example-changelog.sql
ID: 3; Author: other.dev; File path: example-changelog.sql
Checks run against each changeset:
Warn on Detection of 'GRANT' Statements
Warn on Detection of 'REVOKE' Statements
Warn when 'DROP TABLE' detected
Warn when 'DROP COLUMN' detected
Warn when 'MODIFY column' detected
Check Table Column Count (Short Name: 1234)
Check Table Column Count
Warn when 'TRUNCATE TABLE' detected
Warn on Detection of grant that contains 'WITH GRANT OPTION'
Warn on Detection of grant that contains 'WITH ADMIN OPTION'
Rollback Required for Changeset
Changesets Must Have a Label Assigned
Changesets Must Have a Context Assigned
Changesets Must Have a Comment Assigned
Liquibase command 'checks run' was executed successfully.