dbclhistory-enabled

--dbclhistory-enabled is a global Boolean parameter that enables the DATABASECHANGELOGHISTORY table. This table includes records of rollbacks, dropAlls, and repeated runOnChange activity that are not available in the standard DATABASECHANGELOG table. It is available in Liquibase 4.27.0 and later. The default value is false.

Uses

The DATABASECHANGELOGHISTORY (DBCLH) table is disabled by default. To enable it, set --dbclhistory-enabled to true. This way, you have a comprehensive record of all changes you make to your database with Liquibase. This can help you understand your database better and identify deployment slowdowns more effectively.

Note: To create the DBCLH table for the first time, you must run a command like update while --dbclhistory-enabled=true.

There are some situations where you may want to keep the DBCLH table disabled. For example, if you want to deploy a specific change to your database without including it in the DBCLH, such as a test change that you know you will immediately roll back. This can keep your DBCLH and structured logs clean during testing.

Syntax

You can set this parameter in the following ways:

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

JVM system property (JAVA_OPTS Environment Variable)

JAVA_OPTS=-Dliquibase.dbclhistory.enabled=<true|false>
Liquibase Environment Variables
LIQUIBASE_DBCLHISTORY_ENABLED=<true|false>

For more information, see Working with Command Parameters.

Related links