• Reference
  • Version · 6.0
  • Change Automation Reference

global-strip-comments

Last updated: September 29, 2026

--global-strip-comments is a global Boolean parameter that specifies whether to remove any comments in a SQL statement before executing. The default value is false.

The --global-strip-comments is similar to the stripComments attribute for the sql, sqlFile, partiql, and partiqlFile Change Types, but has a global scope.

It is available in Liquibase Secure 5.0 and later and requires a valid Liquibase Secure license key to use.

From Liquibase Pro version 4.29.2 through 4.33, this parameter was called --pro-global-strip-comments. See the change history table at the end of this article for pre-5.0 version syntax.

If you set --global-strip-comments and do not set stripComments, then Liquibase applies the value of --global-strip-comments to all changesets. If you set both, Liquibase determines which value to use for a changeset in the following order:

  1. stripComments set on a specific changeset, including in rollbackSqlFile (highest precedence)

  2. stripComments set in a changelog called by include or includeAll in modifyChangeSets

  3. --global-strip-comments set globally (lowest precedence)

You can give --global-strip-comments the highest precedence of all settings by also using the --global-strip-comments-override parameter.

Uses

In Liquibase Secure 6.0 and later, Liquibase preserves SQL comments in the changesets you deploy, so a stored procedure body arrives in the database with its comments intact. Earlier releases stripped them. To go back to stripping comments, set --global-strip-comments to true.

You can use --global-strip-comments to set comment stripping behavior across all your changesets. This is easier than manually specifying stripComments on every individual changeset. Also, having one central parameter for comment stripping behavior reduces inconsistencies resulting from manual updates to changesets.

Note: This parameter does not override the strip_comments(SQL_string) helper function in Liquibase Python Modules. The custom policy check uses the original SQL from the Change object.

Syntax

You can set this parameter in the following ways:

Option

Syntax

Liquibase properties file (defaults file)

liquibase.globalStripComments: <true|false>

Global flow file argument

globalArgs: { global-strip-comments: "<true|false>" }

Global CLI parameter

liquibase --global-strip-comments=<true|false> update --changelog-file=example-changelog.xml

JVM system property (JAVA_OPTS environment variable)

Unix:

JAVA_OPTS=-Dliquibase.globalStripComments=<true|false>

Windows:

JAVA_OPTS=-D"liquibase.globalStripComments"=<true|false>

Liquibase environment variable

LIQUIBASE_GLOBAL_STRIP_COMMENTS=<boolean>

For more information, see Working with command parameters.

Change history

Version

Changes

Liquibase Secure, version 6.0

Comments are now preserved by default. Previously Liquibase stripped SQL comments from the changesets it deployed. Set --global-strip-comments to true for the earlier behavior.

Liquibase Secure, version 5.0

Parameter changed from --pro-global-strip-comments to ----global-strip-comments.

Here are the previous values from when it was --pro-global-strip-comments.

Liquibase properties file(defaults file) liquibase.pro.globalStripComments: <string>

Global flow file argument

globalArgs: { pro-global-strip-comments: "<string>" }

Global CLI parameter

liquibase

--pro-global-strip-comments=<string> update

--changelog-file=example-changelog.xml

JVM system property(JAVA_OPTS environment variable)

Unix:

JAVA_OPTS=-Dliquibase.pro.globalStripComments=<string>

Windows:

JAVA_OPTS=-D"liquibase.pro.globalStripComments"=<string>