pro-strict

--pro-strict is a global Boolean attribute that specifies whether Liquibase checks for the existence of Liquibase Pro resource files that you've specified. The default value is false. It is available in Liquibase 4.28.0 and later.

--pro-strict is similar to the parameter --strict, which validates some changelog fields and parameter syntax and checks for the existence of Liquibase Open Source resource files.

Uses

If you set --pro-strict to true, Liquibase checks for the existence of the following resource files:

  • Flow files and any nested flow files they reference
  • Policy checks: checks settings files, including files specified in checks package files
  • Native executor configuration files (.conf), but only if you have also set one or more corresponding native executor parameters. For example, if you have set liquibase.sqlcmd.timeout, Liquibase checks for the existence of a configuration file (liquibase.sqlcmd.conf by default). However, if you don't specify any native executor parameters, Liquibase doesn't check for the existence of a configuration file for that executor.
  • Rollback scripts referenced by Formatted SQL, YAML, JSON, and XML changelogs

It is a best practice to set --pro-strict to true so that you can catch mistakes like missing or incorrect file names before you deploy your changes. If you leave strict at its default setting of false, Liquibase ignores these requirements.

Syntax

You can set this parameter in the following ways:

Option Syntax
Liquibase properties file (defaults file)
liquibase.proStrict: <true|false>
Global flow file argument (example)
stages:
  Default:
    actions:
      - type: liquibase
        command: update
        globalArgs: { pro-strict: "<true|false>" }
Global CLI parameter
liquibase
 --pro-strict=<true|false> update
 --changelog-file=example-changelog.xml

JVM system property (JAVA_OPTS Environment Variable)

JAVA_OPTS=-Dliquibase.proStrict=<true|false>
Liquibase Environment Variables
LIQUIBASE_PRO_STRICT=<true|false>

For more information, see Working with Command Parameters.

Output

If you set --pro-strict to true but one of the resource files you've specified is invalid, Liquibase produces the following output:

ERROR: The file '<path/to/file.abc>' specified in '<path/to/resourcefile>'was not found. The global argument 'strict' is enabled, which validates the existence of files specified in liquibase files, such as changelogs, flowfiles, checks packages files, and more. To prevent this message, check your configurations, or disable the 'strict' setting.

Related links