dbclhistory-capture-sql

--dbclhistory-capture-sql is a global Boolean parameter that specifies whether Liquibase captures SQL generated by commands and stores in the DATABASECHANGELOGHISTORY table. It is available in Liquibase 4.27.0 and later. The default value is true.

Uses

When you run a Liquibase command like update or rollback, Liquibase uses that information to construct a SQL query that it sends to your database. By default, Liquibase records all SQL these commands generate in the DATABASECHANGELOGHISTORY (DBCLH) table.

However, if you want to exclude executed SQL from your DBCLH, you can set --dbclhistory-capture-sql to false.

Syntax

You can set this parameter in the following ways:

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

JVM system property (JAVA_OPTS Environment Variable)

JAVA_OPTS=-Dliquibase.dbclhistory.captureSql=<true|false>
Liquibase Environment Variables
LIQUIBASE_DBCLHISTORY_CAPTURE_SQL=<true|false>

For more information, see Working with Command Parameters.

Related links