dbcl-history

Last published July 28, 2025

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

dbcl-history is a command that displays the DATABASECHANGELOGHISTORY table. By default, the command displays the table in STDOUT. It is available in Liquibase 4.27.0 and later. It is only available to Liquibase Pro users.

Uses

The DATABASECHANGELOGHISTORY (DBCLH) table contains all changes ever made to your database with Liquibase, including rollbacks and other changes not included in the DATABASECHANGELOG table (DBCL). You can see the DBCLH table in your database by running a SQL query:

SELECT * FROM DATABASECHANGELOGHISTORY;

However, you may also want Liquibase to display the DBCLH in your command line or an output file without running a SQL query. You may also want to display it in a machine-readable format. The dbcl-history command lets you do all these things. If you have Structured Logging enabled, Liquibase also sends the output of dbcl-history to structured logs. This lets you automatically feed your data into third-party logging tools.

Easily accessing the DBCLH table enables you to identify patterns in your deployments that later have to be rolled back. By understanding these patterns, you can avoid these problems and speed up your development cycle.

Syntax

To display the DBCLH table in STDOUT, run the dbcl-history command in your command line or in a flow file. For example, to generate human-readable JSON output:

CLI example

liquibase dbcl-history --format=JSON_PRETTY --verbose

Flow file example

stages: Default: actions: - type: liquibase command: dbcl-history cmdArgs: {format: JSON_PRETTY, verbose}

You can use the --output-file global parameter to send command output to a file instead of the console:

liquibase --output-file=dbclh_2024-03-15.json dbcl-history --format=JSON_PRETTY --verbose

Parameters

Global parameters

Parameter

Definition

Requirement

--license-key=<string>

Your Liquibase Pro license key

Required

--dbclhistory-capture-extensions=<true|false>

If true, installed extensions are captured in the DATABASECHANGELOGHISTORY table. Liquibase 4.27.0+. Default: true. See --dbclhistory-capture-extensions.

Optional

--dbclhistory-capture-sql=<true|false>

If true, SQL generated by commands is captured in the DATABASECHANGELOGHISTORY table. Liquibase 4.27.0+. Default: true. See --dbclhistory-capture-sql.

Optional

--dbclhistory-enabled=<true|false>

Enables the DATABASECHANGELOGHISTORY table. This table includes records of rollbacks, dropAlls, and repeated runOnChange type activity, which is not available in the standard DATABASECHANGELOG table. Liquibase 4.27.0+. Default: false. See --dbclhistory-enabled.

Optional

--dbclhistory-severity=<string>

The exit code for Liquibase to return if an exception is encountered while recording events to the DATABASECHANGELOGHISTORY table. Valid values are INFO (0), MINOR (1), MAJOR (2), CRITICAL (3), and BLOCKER (4), from least severe to most severe. Liquibase 4.27.0+. Default: 1. See --dbclhistory-severity.

Optional

--output-file=<string>

File path to where the command output will be written. If not specified, output goes to STDOUT. See --output-file.

Optional

Command parameters

Parameter

Definition

Requirement

--url=<string>

The JDBC database connection URL.

Required

--default-catalog-name=<string>

Name of the default catalog to use for the database connection

Optional

--default-schema-name=<string>

Name of the default schema to use for the database connection. If defaultSchemaName is set, then objects do not have to be fully qualified. This means you can refer to just mytable instead of myschema.mytable.

Note: In the properties file and JAVA_OPTS only: in 4.18.0 and earlier, specify this parameter using the syntax defaultSchemaName. In 4.19.0 and later, use the syntax liquibase.command.defaultSchemaName.

Note: In Liquibase 4.12.0 and later, you can use mixed-case schema names if you set --preserve-schema-case to true. However, in Liquibase 4.12.0–4.22.0, the Liquibase validator still throws a DatabaseException error if you specify a mixed-case value of defaultSchemaName. In 4.23.0 and later, the Liquibase validator accepts any casing.

Optional

--driver=<string>

The JDBC driver class

Optional

--driver-properties-file=<string>

The JDBC driver properties file

Optional

--format=<string>

Specifies the format of the output. Valid values are JSON and JSON_PRETTY. Specifying JSON formats the output as machine-readable JSON without indentation or line breaks. Specifying JSON_PRETTY adds whitespace to be human-readable. Default: JSON.

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.

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

Output

[{"arguments":"--dbclhistory-enabled=true --license-key ***** update","author":"your.name","command":"update","comments":"example-comment","contexts":"example-context