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 Classpath 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
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
####################################################
## _ _ _ _ ##
## | | (_) (_) | ##
## | | _ __ _ _ _ _| |__ __ _ ___ ___ ##
## | | | |/ _` | | | | | '_ \ / _` / __|/ _ \ ##
## | |___| | (_| | |_| | | |_) | (_| \__ \ __/ ##
## \_____/_|\__, |\__,_|_|_.__/ \__,_|___/\___| ##
## | | ##
## |_| ##
## ##
## Get documentation at docs.liquibase.com ##
## Get certified courses at learn.liquibase.com ##
## Free schema change activity reports at ##
## https://hub.liquibase.com ##
## ##
####################################################
Starting Liquibase at 09:41:57 (version 4.5.0-DAT-6000-SNAPSHOT #74 built at 2021-09-20 19:47+0000)
Liquibase Version: 4.5.0-DAT-6000-SNAPSHOT
Liquibase Pro 4.5.0-DAT-6000-SNAPSHOT by Datical licensed to Liquibase Pro Customer until Tue Oct 26 19:00:00 CDT 2021
Executing Quality Checks against basicRule.postgres.sql
Executing all checks because a valid Liquibase Pro license was found!
Checks completed validation of the changelog and found the following issues:
Changeset ID: LblAndCtx
Changeset Filepath: basicRule.postgres.sql
Check Name: Changesets Must Have a Comment Assigned (ChangesetCommentCheck)
Message: Liquibase recommends that authors include comments about the
purpose and impact of a changeset in <comment> elements to
prevent the development of tribal knowledge and ensure that
the purpose of a given changeset is easily understood by
other people who use this changelog.
Changesets Validated:
ID: LblAndCtx; Author: erz; File path: basicRule.postgres.sql
ID: CtxNoLbl; Author: erz; File path: basicRule.postgres.sql
ID: LblNoCtx; Author: erz; File path: basicRule.postgres.sql
ID: NoLblNoCtx; Author: erz; File path: basicRule.postgres.sql
ID: sqlContainsRevoke; Author: erz; File path: basicRule.postgres.sql
ID: sqlContainsGrants; Author: erz; File path: basicRule.postgres.sql
ID: sqlCommentIncludesRevoke; Author: erz; File path: basicRule.postgres.sql
ID: sqlWithRevokeInDashDashComment; Author: BBB; File path: basicRule.postgres.sql
ID: sqlWithRevokeInSlashStarComment; Author: BBB; File path: basicRule.postgres.sql
ID: sqlWithRevokeInSelectStatement; Author: BBB; File path: basicRule.postgres.sql
ID: sqlWithRevokeAtStartOfDashDashComment; Author: BBB; File path: basicRule.postgres.sql
ID: sqlWithRevokeBracketsNoSpace; Author: BBB; File path: basicRule.postgres.sql
ID: sqlWithGrant; Author: erz; File path: basicRule.postgres.sql
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
Changesets Must Have a Label Assigned
Changesets Must Have a Context Assigned
Changesets Must Have a Comment Assigned
Liquibase command 'run' was executed successfully.