Update Report

The Liquibase CLI input and output of a deployment (runtime summary) followed by changeset execution details.

The update report is a Liquibase operation report that informs you of system, runtime, operation, and changeset information about your database deployments.

In Liquibase 4.25.1 and later, you can automatically generate a database update report using the Liquibase update family of commands: update, update-count, update-one-changeset, and update-to-tag. The update report gives you a human-readable summary of the state of your database and changelogs, any generated SQL for changesets, whether the operation was successful, any error messages, and other useful data.

Uses

Using Liquibase update reports can help developers, DBAs, DevOps engineers, and managers in the following ways:

  • Easily scan and understand the changes made to your database with the summary section, then dive deeper with the execution details
  • Audit and report on the changes to your database without needing to analyze or interpret logs
  • Collaborate with your team with shareable reports

Enable operation reports

To enable all operation reports, you must:

  1. Set the --license-key property using your Liquibase Pro license key.
  2. Choose how often to generate reports. You can either:
    • Always generate reports:
    • Selectively generate reports at runtime:
      • Command line: liquibase --reports-enabled=true update
      • JVM system property: JAVA_OPTS="-Dliquibase.reports.enabled=true" liquibase update

Update reports in automation

To automatically use Liquibase update reports in your CI/CD pipeline, follow these steps in your CI/CD tool:

  1. Create a LiquibaseUpdateReport job that generates the update report. This job must:
    1. Enable the update report with --reports-enabled (global scope) or --report-enabled (command scope).
    2. Run a Liquibase update* command against your database.

    Tip: For more information, see the Examples section of this page.

Examples

Setting parameters

You can modify the update report output with the parameters listed in the tables on this page. In the CLI, global parameters go to the left of the command and command parameters go to the right of the command.

liquibase \
    --reports-enabled=true \
    --reports-path=reports \
    --reports-name=update_report.html \
  update \
    --changelog-file="example-changelog.xml"

Note: For readability, this page shows parameters on new lines. If you type in the commands on a single line, do not include the backslashes \ shown in the examples.

You can also set parameters in your liquibase.properties file, as environment variables, or in a flow file. For a list of parameters and their syntax in each format, see the Global parameters and Command parameters sections of this page.

Disable reports by default; enable only the update report

If you want to keep reports disabled by default and enable only the update report, you can use the command parameter --report-enabled (singular) on an update family command. For example:

liquibase update \
    --report-enabled=true \
    --report-name=my_update_report.html

This is an example flow file running a update report:

stages:
  Update_Report:
    actions:
      - type: liquibase
        command: update
        cmdArgs: { changelog-file: "example-changelog.xml",
                        report-format: "HTML"}
        globalArgs: { mirror-console-messages-to-log: "true",
                        reports-enabled: "true",
                        reports-path: "reports",
                        reports-name: "update-report.html"}

Note: This example uses reports-enabled (plural) within globalArgs to enables all operation reports. To enable this specific kind of report, but not other reports, you must instead set report-enabled (singular) in cmdArgs.

Global parameters

Use these parameters to control the behavior of all operation reports.

Note: Syntax for each parameter is specified in kebab-case (CLI and flow file), camelCase (properties file and JAVA_OPTS), and MACRO_CASE (environment variable).

Syntax (--cli, {flow-file}, propertiesFile, ENV_VAR) Type Description Requirement
--reports-enabled
globalArgs: {reports-enabled: "val"}
liquibase.reports.enabled
LIQUIBASE_REPORTS_ENABLED
Boolean Enables or disables all reports at the global level. Overridden by --report-enabled at the command level. Default: false. Required (either this or --report-enabled)
--reports-name
globalArgs: {reports-name: "val"}
liquibase.reports.name
LIQUIBASE_REPORTS_NAME
String Specifies the name of the report file at the global level. Overridden by --report-name at the command level. By default, Liquibase generates a new report file labeled with a timestamp (user's local time). If you set a custom name, Liquibase overwrites the existing file every time you generate a new report. Default: report-<DD-Mon-YYYY-HHmmss>.html. Optional
--reports-path
globalArgs: {reports-path: "val"}
liquibase.reports.path
LIQUIBASE_REPORTS_PATH
String Specifies the file path to the report file at the global level. Overridden by --report-path at the command level. Default: ./. Optional

Command parameters

Use these command parameters if you want to specify operation report behavior for a specific command.

Syntax (--cli, {flow-file}, propertiesFile, ENV_VAR) Type Description Requirement
--report-enabled
cmdArgs: {report-enabled: "val"}
liquibase.command.<cmdName>.reportEnabled
LIQUIBASE_COMMAND_<CMDNAME>_REPORT_ENABLED
Boolean

Enables a report at the command level. Overrides the global argument --reports-enabled. Default: false.

Required (either this or --reports-enabled)
--open-report
cmdArgs: {open-report: "val"}
liquibase.command.<cmdName>.openReport
LIQUIBASE_COMMAND_<CMDNAME>_OPEN_REPORT
Boolean

If true, automatically opens the report in your default browser. Default: false.

Optional
--report-name
cmdArgs: {report-name: "val"}
liquibase.command.<cmdName>.reportName
LIQUIBASE_COMMAND_<CMDNAME>_REPORT_NAME
String

Specifies the name of the report file at the command level. Overrides the global argument --reports-name. By default, Liquibase generates a new report file labeled with a timestamp (user's local time). If you set a custom name, Liquibase overwrites the existing file every time you generate a new report. Default: report-<DD-Mon-YYYY-HHmmss>.html.

Optional
--report-path
cmdArgs: {report-path: "val"}
liquibase.command.<cmdName>.reportPath
LIQUIBASE_COMMAND_<CMDNAME>_REPORT_PATH
String

Specifies the file path to the report file at the command level. Overrides the global argument --reports-path. Default: ./.

Optional