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 |
| Your Liquibase Pro license key | Required |
| If | Optional |
| If | Optional |
| 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: | Optional |
| The exit code for Liquibase to return if an exception is encountered while recording events to the DATABASECHANGELOGHISTORY table. Valid values are | Optional |
| File path to where the command output will be written. If not specified, output goes to | Optional |
Command parameters
Parameter | Definition | Requirement |
| The JDBC database connection URL. | Required |
| Name of the default catalog to use for the database connection | Optional |
| Name of the default schema to use for the database connection. If Note: In the properties file and Note: In Liquibase 4.12.0 and later, you can use mixed-case schema names if you set | Optional |
| The JDBC driver class | Optional |
| The JDBC driver properties file | Optional |
| Specifies the format of the output. Valid values are | Optional |
| 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 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 |
| Specifies the detail level of the command's output. Default: | Optional |
Output
[{"arguments":"--dbclhistory-enabled=true --license-key ***** update","author":"your.name","command":"update","comments":"example-comment","contexts":"example-context