run

Note: This is a Liquibase Pro feature, so you need a Liquibase Pro License Key to use it.

The run subcommand executes checks using the checks settings file against a changelog, database, or both. Quality checks support XML, SQL, YAML, and JSON changelog formats, and all the Liquibase Pro-certified databases.

Uses

The checks run executes enabled checks based on the --checks-scope property. To specify the scope, set checks-scope to changelog, database, or changelog,database to run both scopes.

The checks run command by default executes the enabled changelog checks against the specified changelog using the checks settings files, which can have default and/or non-default locations. When you run a database-scoped check, Liquibase takes a snapshot of your database to run the checks against.

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.

In Liquibase Pro 4.26.0 and later, you can use checks run to seamlessly generate a Checks Run Report for your database.

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

Syntax

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. See Use the Checks Settings Configuration File.

To execute checks that require a database connection, you must also include connection attributes such as the database url.

Parameters

Global parameters

Parameter Definition Requirement

--license-key=<string>

Your Liquibase Pro license key

Required

Command parameters

Parameter Description Requirement

--changelog-file=<string>

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

Required (either this or --url)

--url=<string>

The JDBC database connection URL. See Using JDBC URL in Liquibase.

Required (either this or --changelog-file)

--auto-enable-new-checks=<true|false>

  Optional

--auto-update=<string>

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

Default: off

Optional

--cache-changelog-file-contents=<true|false>

If true, sqlFile change type contents will be cached in memory to improve performance, at the cost of higher memory usage. To reduce memory usage, set this to false. Default: true Optional

--changeset-filter=<string>

Specifies whether quality checks run on ALL changesets or only PENDING (undeployed) changesets. Only applies to checks with the "changelog" scope. Liquibase 4.26.0+. Default: ALL.

Optional

--check-name=<string>

Use this to specify the short name of the check you want to target with one of the following subcommands:

  • bulk-set
  • copy
  • customize
  • delete
  • disable
  • enable
  • reset
  • run
  • show
Optional

--check-rollbacks=<true|false>

Allow changeset's rollback code to be analyzed for compliance with currently enabled quality checks. Default: false Optional

--checks-output=<string>

Specify which parts of the checks run output should be shown.

Options:

  • all show everything/all sections (DEFAULT)
  • issues show the triggered checks
  • issues0 show the issues with severity 0
  • issues1 show the issues with severity 1
  • issues2 show the issues with severity 2
  • issues3 show the issues with severity 3
  • issues4 show the issues with severity 4
  • validated show the section that starts with "Changesets Validated"
  • checksrun show the section that starts with "Checks run against each changeset"
  • sqlparserfails show the section that starts with "Changeset SQL not parsed in..."
  • skippedchecks show the section that starts with "Changelogs Checks Skipped Due to unsupported changeset..."

Default: all

Optional

--checks-packages=<string>

  Optional

--checks-scope=<string>

The Liquibase component to run checks against, which can be a comma separated list

Dual-scoped: Can run against changelogs and databases separately or simultaneously.

See checks-scope.

Optional

--checks-settings-file=<string>

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 Use the Checks Settings Configuration File.

Optional

--context-filter=<string>

Specifies the changeset contexts to match. Contexts are tags you can add to changesets to control which changesets are executed in any particular migration run.

Note: If you use Liquibase 4.23.0 or earlier, use the syntax --contexts instead of --context-filter.

Optional

--default-catalog-name=<string>

  Optional

--default-schema-name=<string>

  Optional

--driver=<string>

  Optional

--driver-properties-file=<string>

  Optional

--format=<string>

Only Available in Liquibase Pro

Sets the format of the check output to text or JSON.

Default: text

For more information, see Quality Checks JSON Object.

Optional

--label-filter=<string>

Specifies the changeset labels to match. Labels are tags you can add to changesets to control which changesets will be executed in any migration run.

Optional

--password=<string>

Password to connect to the target database.

Tip: It is a best practice to store sensitive data in a Secrets Management tool with Liquibase Pro.

 

--property-substitution-enabled=<true|false>

Allows you to check to see if changeset text is evaluated pre or post property substitution. This argument is for the whole of checks run, not a specific quality check. Default: true Optional

--report-enabled=<true|false>

Enables a report at the command level. Overrides the global argument --reports-enabled. Default: false.

Optional

--report-name=<string>

Specifies the name of the report file at the command level. Overrides the global argument --reports-name. By default, Liquibase generates a new report file labeled with a timestamp (user's local time). If you set a custom name, Liquibase overwrites the existing file every time you generate a new report. Default: report-<DD-Mon-YYYY-HHmmss>.html.

Optional

--report-path=<string>

Specifies the file path to the report file at the command level. Overrides the global argument --reports-path. Default: ./.

Optional

--schemas=<string>

The schemas to check when checks-scope contains database Optional

--sql-parser-fail-severity=<string>

Allows specification of the severity value returned when a check fails due to a SQL parse error.

Return Codes:
0 is INFO
1 is MINOR
2 is MAJOR
3 is CRITICAL
4 is BLOCKER

Default: severity of the check
If not set, the software will return the severity of the executed check.

Optional

--username=<string>

Username to connect to the target database.

Tip: It is a best practice to store sensitive data in a Secrets Management tool with Liquibase Pro.

Optional

--verbose=<true|false>

Specifies the detail level of the command's output. Default: false.

Optional

Global parameters

Parameter Definition Requirement

globalArgs: { license-key: "<string>" }

Your Liquibase Pro license key

Required

Command parameters

Parameter Description Requirement

cmdArgs: { changelog-file: "<string>" }

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

Required (either this or --url)

cmdArgs: { url: "<string>" }

The JDBC database connection URL. See Using JDBC URL in Liquibase.

Required (either this or --changelog-file)

cmdArgs: { auto-enable-new-checks: "<true|false>" }

  Optional

cmdArgs: { auto-update: "<string>" }

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

Default: off

Optional

cmdArgs: { cache-changelog-file-contents: "<true|false>" }

If true, sqlFile change type contents will be cached in memory to improve performance, at the cost of higher memory usage. To reduce memory usage, set this to false. Default: true Optional

cmdArgs: { changeset-filter: "<string>" }

Specifies whether quality checks run on ALL changesets or only PENDING (undeployed) changesets. Only applies to checks with the "changelog" scope. Liquibase 4.26.0+. Default: ALL.

Optional

cmdArgs: { check-name: "<string>" }

Use this to specify the short name of the check you want to target with one of the following subcommands:

  • bulk-set
  • copy
  • customize
  • delete
  • disable
  • enable
  • reset
  • run
  • show
Optional

cmdArgs: { check-rollbacks: "<true|false>" }

Allow changeset's rollback code to be analyzed for compliance with currently enabled quality checks. Default: false Optional

cmdArgs: { checks-output: "<string>" }

Specify which parts of the checks run output should be shown.

Options:

  • all show everything/all sections (DEFAULT)
  • issues show the triggered checks
  • issues0 show the issues with severity 0
  • issues1 show the issues with severity 1
  • issues2 show the issues with severity 2
  • issues3 show the issues with severity 3
  • issues4 show the issues with severity 4
  • validated show the section that starts with "Changesets Validated"
  • checksrun show the section that starts with "Checks run against each changeset"
  • sqlparserfails show the section that starts with "Changeset SQL not parsed in..."
  • skippedchecks show the section that starts with "Changelogs Checks Skipped Due to unsupported changeset..."

Default: all

Optional

cmdArgs: { checks-packages: "<string>" }

  Optional

cmdArgs: { checks-scope: "<string>" }

The Liquibase component to run checks against, which can be a comma separated list

Dual-scoped: Can run against changelogs and databases separately or simultaneously.

See checks-scope.

Optional

cmdArgs: { checks-settings-file: "<string>" }

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 Use the Checks Settings Configuration File.

Optional

cmdArgs: { context-filter: "<string>" }

Specifies the changeset contexts to match. Contexts are tags you can add to changesets to control which changesets are executed in any particular migration run.

Note: If you use Liquibase 4.23.0 or earlier, use the syntax --contexts instead of --context-filter.

Optional

cmdArgs: { default-catalog-name: "<string>" }

  Optional

cmdArgs: { default-schema-name: "<string>" }

  Optional

cmdArgs: { driver: "<string>" }

  Optional

cmdArgs: { driver-properties-file: "<string>" }

  Optional

cmdArgs: { format: "<string>" }

Only Available in Liquibase Pro

Sets the format of the check output to text or JSON.

Default: text

For more information, see Quality Checks JSON Object.

Optional

cmdArgs: { label-filter: "<string>" }

Specifies the changeset labels to match. Labels are tags you can add to changesets to control which changesets will be executed in any migration run.

Optional

cmdArgs: { password: "<string>" }

Password to connect to the target database.

Tip: It is a best practice to store sensitive data in a Secrets Management tool with Liquibase Pro.

 

cmdArgs: { property-substitution-enabled: "<true|false>" }

Allows you to check to see if changeset text is evaluated pre or post property substitution. This argument is for the whole of checks run, not a specific quality check. Default: true Optional

cmdArgs: { report-enabled: "<true|false>" }

Enables a report at the command level. Overrides the global argument --reports-enabled. Default: false.

Optional

cmdArgs: { report-name: "<string>" }

Specifies the name of the report file at the command level. Overrides the global argument --reports-name. By default, Liquibase generates a new report file labeled with a timestamp (user's local time). If you set a custom name, Liquibase overwrites the existing file every time you generate a new report. Default: report-<DD-Mon-YYYY-HHmmss>.html.

Optional

cmdArgs: { report-path: "<string>" }

Specifies the file path to the report file at the command level. Overrides the global argument --reports-path. Default: ./.

Optional

cmdArgs: { schemas: "<string>" }

The schemas to check when checks-scope contains database Optional

cmdArgs: { sql-parser-fail-severity: "<string>" }

Allows specification of the severity value returned when a check fails due to a SQL parse error.

Return Codes:
0 is INFO
1 is MINOR
2 is MAJOR
3 is CRITICAL
4 is BLOCKER

Default: severity of the check
If not set, the software will return the severity of the executed check.

Optional

cmdArgs: { username: "<string>" }

Username to connect to the target database.

Tip: It is a best practice to store sensitive data in a Secrets Management tool with Liquibase Pro.

Optional

cmdArgs: { verbose: "<true|false>" }

Specifies the detail level of the command's output. Default: false.

Optional

Global parameters

Parameter Definition Requirement

liquibase.licenseKey: <string>

Your Liquibase Pro license key

Required

Command parameters

Parameter Description Requirement

liquibase.command.changelogFile: <string>

liquibase.command.<cmdName>.changelogFile: <string>

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

Required (either this or --url)

liquibase.command.url: <string>

liquibase.command.<cmdName>.url: <string>

The JDBC database connection URL. See Using JDBC URL in Liquibase.

Required (either this or --changelog-file)

liquibase.command.autoEnableNewChecks: <true|false>

liquibase.command.<cmdName>.autoEnableNewChecks: <true|false>

  Optional

liquibase.command.autoUpdate: <string>

liquibase.command.<cmdName>.autoUpdate: <string>

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

Default: off

Optional

liquibase.command.cacheChangelogFileContents: <true|false>

liquibase.command.<cmdName>.cacheChangelogFileContents: <true|false>

If true, sqlFile change type contents will be cached in memory to improve performance, at the cost of higher memory usage. To reduce memory usage, set this to false. Default: true Optional

liquibase.command.changesetFilter: <string>

liquibase.command.<cmdName>.changesetFilter: <string>

Specifies whether quality checks run on ALL changesets or only PENDING (undeployed) changesets. Only applies to checks with the "changelog" scope. Liquibase 4.26.0+. Default: ALL.

Optional

liquibase.command.checkName: <string>

liquibase.command.<cmdName>.checkName: <string>

Use this to specify the short name of the check you want to target with one of the following subcommands:

  • bulk-set
  • copy
  • customize
  • delete
  • disable
  • enable
  • reset
  • run
  • show
Optional

liquibase.command.checkRollbacks: <true|false>

liquibase.command.<cmdName>.checkRollbacks: <true|false>

Allow changeset's rollback code to be analyzed for compliance with currently enabled quality checks. Default: false Optional

liquibase.command.checksOutput: <string>

liquibase.command.<cmdName>.checksOutput: <string>

Specify which parts of the checks run output should be shown.

Options:

  • all show everything/all sections (DEFAULT)
  • issues show the triggered checks
  • issues0 show the issues with severity 0
  • issues1 show the issues with severity 1
  • issues2 show the issues with severity 2
  • issues3 show the issues with severity 3
  • issues4 show the issues with severity 4
  • validated show the section that starts with "Changesets Validated"
  • checksrun show the section that starts with "Checks run against each changeset"
  • sqlparserfails show the section that starts with "Changeset SQL not parsed in..."
  • skippedchecks show the section that starts with "Changelogs Checks Skipped Due to unsupported changeset..."

Default: all

Optional

liquibase.command.checksPackages: <string>

liquibase.command.<cmdName>.checksPackages: <string>

  Optional

liquibase.command.checksScope: <string>

liquibase.command.<cmdName>.checksScope: <string>

The Liquibase component to run checks against, which can be a comma separated list

Dual-scoped: Can run against changelogs and databases separately or simultaneously.

See checks-scope.

Optional

liquibase.command.checksSettingsFile: <string>

liquibase.command.<cmdName>.checksSettingsFile: <string>

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 Use the Checks Settings Configuration File.

Optional

liquibase.command.contextFilter: <string>

liquibase.command.<cmdName>.contextFilter: <string>

Specifies the changeset contexts to match. Contexts are tags you can add to changesets to control which changesets are executed in any particular migration run.

Note: If you use Liquibase 4.23.0 or earlier, use the syntax --contexts instead of --context-filter.

Optional

liquibase.command.defaultCatalogName: <string>

liquibase.command.<cmdName>.defaultCatalogName: <string>

  Optional

liquibase.command.defaultSchemaName: <string>

liquibase.command.<cmdName>.defaultSchemaName: <string>

  Optional

liquibase.command.driver: <string>

liquibase.command.<cmdName>.driver: <string>

  Optional

liquibase.command.driverPropertiesFile: <string>

liquibase.command.<cmdName>.driverPropertiesFile: <string>

  Optional

liquibase.command.format: <string>

liquibase.command.<cmdName>.format: <string>

Only Available in Liquibase Pro

Sets the format of the check output to text or JSON.

Default: text

For more information, see Quality Checks JSON Object.

Optional

liquibase.command.labelFilter: <string>

liquibase.command.<cmdName>.labelFilter: <string>

Specifies the changeset labels to match. Labels are tags you can add to changesets to control which changesets will be executed in any migration run.

Optional

liquibase.command.password: <string>

liquibase.command.<cmdName>.password: <string>

Password to connect to the target database.

Tip: It is a best practice to store sensitive data in a Secrets Management tool with Liquibase Pro.

 

liquibase.command.propertySubstitutionEnabled: <true|false>

liquibase.command.<cmdName>.propertySubstitutionEnabled: <true|false>

Allows you to check to see if changeset text is evaluated pre or post property substitution. This argument is for the whole of checks run, not a specific quality check. Default: true Optional

liquibase.command.reportEnabled: <true|false>

liquibase.command.<cmdName>.reportEnabled: <true|false>

Enables a report at the command level. Overrides the global argument --reports-enabled. Default: false.

Optional

liquibase.command.reportName: <string>

liquibase.command.<cmdName>.reportName: <string>

Specifies the name of the report file at the command level. Overrides the global argument --reports-name. By default, Liquibase generates a new report file labeled with a timestamp (user's local time). If you set a custom name, Liquibase overwrites the existing file every time you generate a new report. Default: report-<DD-Mon-YYYY-HHmmss>.html.

Optional

liquibase.command.reportPath: <string>

liquibase.command.<cmdName>.reportPath: <string>

Specifies the file path to the report file at the command level. Overrides the global argument --reports-path. Default: ./.

Optional

liquibase.command.schemas: <string>

liquibase.command.<cmdName>.schemas: <string>

The schemas to check when checks-scope contains database Optional

liquibase.command.sqlParserFailSeverity: <string>

liquibase.command.<cmdName>.sqlParserFailSeverity: <string>

Allows specification of the severity value returned when a check fails due to a SQL parse error.

Return Codes:
0 is INFO
1 is MINOR
2 is MAJOR
3 is CRITICAL
4 is BLOCKER

Default: severity of the check
If not set, the software will return the severity of the executed check.

Optional

liquibase.command.username: <string>

liquibase.command.<cmdName>.username: <string>

Username to connect to the target database.

Tip: It is a best practice to store sensitive data in a Secrets Management tool with Liquibase Pro.

Optional

liquibase.command.verbose: <true|false>

liquibase.command.<cmdName>.verbose: <true|false>

Specifies the detail level of the command's output. Default: false.

Optional

Global parameters

Parameter Definition Requirement

JAVA_OPTS=-Dliquibase.licenseKey=<string>

Your Liquibase Pro license key

Required

Command parameters

Parameter Description Requirement

JAVA_OPTS=-Dliquibase.command.changelogFile=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.changelogFile=<string>

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

Required (either this or --url)

JAVA_OPTS=-Dliquibase.command.url=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.url=<string>

The JDBC database connection URL. See Using JDBC URL in Liquibase.

Required (either this or --changelog-file)

JAVA_OPTS=-Dliquibase.command.autoEnableNewChecks=<true|false>

JAVA_OPTS=-Dliquibase.command.<cmdName>.autoEnableNewChecks=<true|false>

  Optional

JAVA_OPTS=-Dliquibase.command.autoUpdate=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.autoUpdate=<string>

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

Default: off

Optional

JAVA_OPTS=-Dliquibase.command.cacheChangelogFileContents=<true|false>

JAVA_OPTS=-Dliquibase.command.<cmdName>.cacheChangelogFileContents=<true|false>

If true, sqlFile change type contents will be cached in memory to improve performance, at the cost of higher memory usage. To reduce memory usage, set this to false. Default: true Optional

JAVA_OPTS=-Dliquibase.command.changesetFilter=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.changesetFilter=<string>

Specifies whether quality checks run on ALL changesets or only PENDING (undeployed) changesets. Only applies to checks with the "changelog" scope. Liquibase 4.26.0+. Default: ALL.

Optional

JAVA_OPTS=-Dliquibase.command.checkName=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.checkName=<string>

Use this to specify the short name of the check you want to target with one of the following subcommands:

  • bulk-set
  • copy
  • customize
  • delete
  • disable
  • enable
  • reset
  • run
  • show
Optional

JAVA_OPTS=-Dliquibase.command.checkRollbacks=<true|false>

JAVA_OPTS=-Dliquibase.command.<cmdName>.checkRollbacks=<true|false>

Allow changeset's rollback code to be analyzed for compliance with currently enabled quality checks. Default: false Optional

JAVA_OPTS=-Dliquibase.command.checksOutput=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.checksOutput=<string>

Specify which parts of the checks run output should be shown.

Options:

  • all show everything/all sections (DEFAULT)
  • issues show the triggered checks
  • issues0 show the issues with severity 0
  • issues1 show the issues with severity 1
  • issues2 show the issues with severity 2
  • issues3 show the issues with severity 3
  • issues4 show the issues with severity 4
  • validated show the section that starts with "Changesets Validated"
  • checksrun show the section that starts with "Checks run against each changeset"
  • sqlparserfails show the section that starts with "Changeset SQL not parsed in..."
  • skippedchecks show the section that starts with "Changelogs Checks Skipped Due to unsupported changeset..."

Default: all

Optional

JAVA_OPTS=-Dliquibase.command.checksPackages=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.checksPackages=<string>

  Optional

JAVA_OPTS=-Dliquibase.command.checksScope=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.checksScope=<string>

The Liquibase component to run checks against, which can be a comma separated list

Dual-scoped: Can run against changelogs and databases separately or simultaneously.

See checks-scope.

Optional

JAVA_OPTS=-Dliquibase.command.checksSettingsFile=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.checksSettingsFile=<string>

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 Use the Checks Settings Configuration File.

Optional

JAVA_OPTS=-Dliquibase.command.contextFilter=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.contextFilter=<string>

Specifies the changeset contexts to match. Contexts are tags you can add to changesets to control which changesets are executed in any particular migration run.

Note: If you use Liquibase 4.23.0 or earlier, use the syntax --contexts instead of --context-filter.

Optional

JAVA_OPTS=-Dliquibase.command.defaultCatalogName=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.defaultCatalogName=<string>

  Optional

JAVA_OPTS=-Dliquibase.command.defaultSchemaName=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.defaultSchemaName=<string>

  Optional

JAVA_OPTS=-Dliquibase.command.driver=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.driver=<string>

  Optional

JAVA_OPTS=-Dliquibase.command.driverPropertiesFile=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.driverPropertiesFile=<string>

  Optional

JAVA_OPTS=-Dliquibase.command.format=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.format=<string>

Only Available in Liquibase Pro

Sets the format of the check output to text or JSON.

Default: text

For more information, see Quality Checks JSON Object.

Optional

JAVA_OPTS=-Dliquibase.command.labelFilter=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.labelFilter=<string>

Specifies the changeset labels to match. Labels are tags you can add to changesets to control which changesets will be executed in any migration run.

Optional

JAVA_OPTS=-Dliquibase.command.password=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.password=<string>

Password to connect to the target database.

Tip: It is a best practice to store sensitive data in a Secrets Management tool with Liquibase Pro.

 

JAVA_OPTS=-Dliquibase.command.propertySubstitutionEnabled=<true|false>

JAVA_OPTS=-Dliquibase.command.<cmdName>.propertySubstitutionEnabled=<true|false>

Allows you to check to see if changeset text is evaluated pre or post property substitution. This argument is for the whole of checks run, not a specific quality check. Default: true Optional

JAVA_OPTS=-Dliquibase.command.reportEnabled=<true|false>

JAVA_OPTS=-Dliquibase.command.<cmdName>.reportEnabled=<true|false>

Enables a report at the command level. Overrides the global argument --reports-enabled. Default: false.

Optional

JAVA_OPTS=-Dliquibase.command.reportName=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.reportName=<string>

Specifies the name of the report file at the command level. Overrides the global argument --reports-name. By default, Liquibase generates a new report file labeled with a timestamp (user's local time). If you set a custom name, Liquibase overwrites the existing file every time you generate a new report. Default: report-<DD-Mon-YYYY-HHmmss>.html.

Optional

JAVA_OPTS=-Dliquibase.command.reportPath=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.reportPath=<string>

Specifies the file path to the report file at the command level. Overrides the global argument --reports-path. Default: ./.

Optional

JAVA_OPTS=-Dliquibase.command.schemas=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.schemas=<string>

The schemas to check when checks-scope contains database Optional

JAVA_OPTS=-Dliquibase.command.sqlParserFailSeverity=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.sqlParserFailSeverity=<string>

Allows specification of the severity value returned when a check fails due to a SQL parse error.

Return Codes:
0 is INFO
1 is MINOR
2 is MAJOR
3 is CRITICAL
4 is BLOCKER

Default: severity of the check
If not set, the software will return the severity of the executed check.

Optional

JAVA_OPTS=-Dliquibase.command.username=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.username=<string>

Username to connect to the target database.

Tip: It is a best practice to store sensitive data in a Secrets Management tool with Liquibase Pro.

Optional

JAVA_OPTS=-Dliquibase.command.verbose=<true|false>

JAVA_OPTS=-Dliquibase.command.<cmdName>.verbose=<true|false>

Specifies the detail level of the command's output. Default: false.

Optional

Global parameters

Parameter Definition Requirement

LIQUIBASE_LICENSE_KEY=<string>

Your Liquibase Pro license key

Required

Command parameters

Parameter Description Requirement

LIQUIBASE_COMMAND_CHANGELOG_FILE=<string>

LIQUIBASE_COMMAND_<CMDNAME>_CHANGELOG_FILE=<string>

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

Required (either this or --url)

LIQUIBASE_COMMAND_URL=<string>

LIQUIBASE_COMMAND_<CMDNAME>_URL=<string>

The JDBC database connection URL. See Using JDBC URL in Liquibase.

Required (either this or --changelog-file)

LIQUIBASE_COMMAND_AUTO_ENABLE_NEW_CHECKS=<true|false>

LIQUIBASE_COMMAND_<CMDNAME>_AUTO_ENABLE_NEW_CHECKS=<true|false>

  Optional

LIQUIBASE_COMMAND_AUTO_UPDATE=<string>

LIQUIBASE_COMMAND_<CMDNAME>_AUTO_UPDATE=<string>

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

Default: off

Optional

LIQUIBASE_COMMAND_CACHE_CHANGELOG_FILE_CONTENTS=<true|false>

LIQUIBASE_COMMAND_<CMDNAME>_CACHE_CHANGELOG_FILE_CONTENTS=<true|false>

If true, sqlFile change type contents will be cached in memory to improve performance, at the cost of higher memory usage. To reduce memory usage, set this to false. Default: true Optional

LIQUIBASE_COMMAND_CHANGESET_FILTER=<string>

LIQUIBASE_COMMAND_<CMDNAME>_CHANGESET_FILTER=<string>

Specifies whether quality checks run on ALL changesets or only PENDING (undeployed) changesets. Only applies to checks with the "changelog" scope. Liquibase 4.26.0+. Default: ALL.

Optional

LIQUIBASE_COMMAND_CHECK_NAME=<string>

LIQUIBASE_COMMAND_<CMDNAME>_CHECK_NAME=<string>

Use this to specify the short name of the check you want to target with one of the following subcommands:

  • bulk-set
  • copy
  • customize
  • delete
  • disable
  • enable
  • reset
  • run
  • show
Optional

LIQUIBASE_COMMAND_CHECK_ROLLBACKS=<true|false>

LIQUIBASE_COMMAND_<CMDNAME>_CHECK_ROLLBACKS=<true|false>

Allow changeset's rollback code to be analyzed for compliance with currently enabled quality checks. Default: false Optional

LIQUIBASE_COMMAND_CHECKS_OUTPUT=<string>

LIQUIBASE_COMMAND_<CMDNAME>_CHECKS_OUTPUT=<string>

Specify which parts of the checks run output should be shown.

Options:

  • all show everything/all sections (DEFAULT)
  • issues show the triggered checks
  • issues0 show the issues with severity 0
  • issues1 show the issues with severity 1
  • issues2 show the issues with severity 2
  • issues3 show the issues with severity 3
  • issues4 show the issues with severity 4
  • validated show the section that starts with "Changesets Validated"
  • checksrun show the section that starts with "Checks run against each changeset"
  • sqlparserfails show the section that starts with "Changeset SQL not parsed in..."
  • skippedchecks show the section that starts with "Changelogs Checks Skipped Due to unsupported changeset..."

Default: all

Optional

LIQUIBASE_COMMAND_CHECKS_PACKAGES=<string>

LIQUIBASE_COMMAND_<CMDNAME>_CHECKS_PACKAGES=<string>

  Optional

LIQUIBASE_COMMAND_CHECKS_SCOPE=<string>

LIQUIBASE_COMMAND_<CMDNAME>_CHECKS_SCOPE=<string>

The Liquibase component to run checks against, which can be a comma separated list

Dual-scoped: Can run against changelogs and databases separately or simultaneously.

See checks-scope.

Optional

LIQUIBASE_COMMAND_CHECKS_SETTINGS_FILE=<string>

LIQUIBASE_COMMAND_<CMDNAME>_CHECKS_SETTINGS_FILE=<string>

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 Use the Checks Settings Configuration File.

Optional

LIQUIBASE_COMMAND_CONTEXT_FILTER=<string>

LIQUIBASE_COMMAND_<CMDNAME>_CONTEXT_FILTER=<string>

Specifies the changeset contexts to match. Contexts are tags you can add to changesets to control which changesets are executed in any particular migration run.

Note: If you use Liquibase 4.23.0 or earlier, use the syntax --contexts instead of --context-filter.

Optional

LIQUIBASE_COMMAND_DEFAULT_CATALOG_NAME=<string>

LIQUIBASE_COMMAND_<CMDNAME>_DEFAULT_CATALOG_NAME=<string>

  Optional

LIQUIBASE_COMMAND_DEFAULT_SCHEMA_NAME=<string>

LIQUIBASE_COMMAND_<CMDNAME>_DEFAULT_SCHEMA_NAME=<string>

  Optional

LIQUIBASE_COMMAND_DRIVER=<string>

LIQUIBASE_COMMAND_<CMDNAME>_DRIVER=<string>

  Optional

LIQUIBASE_COMMAND_DRIVER_PROPERTIES_FILE=<string>

LIQUIBASE_COMMAND_<CMDNAME>_DRIVER_PROPERTIES_FILE=<string>

  Optional

LIQUIBASE_COMMAND_FORMAT=<string>

LIQUIBASE_COMMAND_<CMDNAME>_FORMAT=<string>

Only Available in Liquibase Pro

Sets the format of the check output to text or JSON.

Default: text

For more information, see Quality Checks JSON Object.

Optional

LIQUIBASE_COMMAND_LABEL_FILTER=<string>

LIQUIBASE_COMMAND_<CMDNAME>_LABEL_FILTER=<string>

Specifies the changeset labels to match. Labels are tags you can add to changesets to control which changesets will be executed in any migration run.

Optional

LIQUIBASE_COMMAND_PASSWORD=<string>

LIQUIBASE_COMMAND_<CMDNAME>_PASSWORD=<string>

Password to connect to the target database.

Tip: It is a best practice to store sensitive data in a Secrets Management tool with Liquibase Pro.

 

LIQUIBASE_COMMAND_PROPERTY_SUBSTITUTION_ENABLED=<true|false>

LIQUIBASE_COMMAND_<CMDNAME>_PROPERTY_SUBSTITUTION_ENABLED=<true|false>

Allows you to check to see if changeset text is evaluated pre or post property substitution. This argument is for the whole of checks run, not a specific quality check. Default: true Optional

LIQUIBASE_COMMAND_REPORT_ENABLED=<true|false>

LIQUIBASE_COMMAND_<CMDNAME>_REPORT_ENABLED=<true|false>

Enables a report at the command level. Overrides the global argument --reports-enabled. Default: false.

Optional

LIQUIBASE_COMMAND_REPORT_NAME=<string>

LIQUIBASE_COMMAND_<CMDNAME>_REPORT_NAME=<string>

Specifies the name of the report file at the command level. Overrides the global argument --reports-name. By default, Liquibase generates a new report file labeled with a timestamp (user's local time). If you set a custom name, Liquibase overwrites the existing file every time you generate a new report. Default: report-<DD-Mon-YYYY-HHmmss>.html.

Optional

LIQUIBASE_COMMAND_REPORT_PATH=<string>

LIQUIBASE_COMMAND_<CMDNAME>_REPORT_PATH=<string>

Specifies the file path to the report file at the command level. Overrides the global argument --reports-path. Default: ./.

Optional

LIQUIBASE_COMMAND_SCHEMAS=<string>

LIQUIBASE_COMMAND_<CMDNAME>_SCHEMAS=<string>

The schemas to check when checks-scope contains database Optional

LIQUIBASE_COMMAND_SQL_PARSER_FAIL_SEVERITY=<string>

LIQUIBASE_COMMAND_<CMDNAME>_SQL_PARSER_FAIL_SEVERITY=<string>

Allows specification of the severity value returned when a check fails due to a SQL parse error.

Return Codes:
0 is INFO
1 is MINOR
2 is MAJOR
3 is CRITICAL
4 is BLOCKER

Default: severity of the check
If not set, the software will return the severity of the executed check.

Optional

LIQUIBASE_COMMAND_USERNAME=<string>

LIQUIBASE_COMMAND_<CMDNAME>_USERNAME=<string>

Username to connect to the target database.

Tip: It is a best practice to store sensitive data in a Secrets Management tool with Liquibase Pro.

Optional

LIQUIBASE_COMMAND_VERBOSE=<true|false>

LIQUIBASE_COMMAND_<CMDNAME>_VERBOSE=<true|false>

Specifies the detail level of the command's output. Default: false.

Optional

Related links