Liquibase 4.24.0 Release Notes

Full Changelog: v4.23.2...v4.24.0 (October 2, 2023)

Liquibase 4.24.0 is a major release.

Note: For Liquibase Pro users of native executors, if you have checksum issues in 4.19.0–4.23.0, please skip any previous release and upgrade to the 4.24.0 release.

Liquibase Pro

Liquibase Flows

  • Flow file variables are shared across "nested" flow files and can be passed through multiple flow files.
  • Flow files running quality checks will now exit with a return code from the highest return code triggered by any check.
  • Related tickets: [DAT-15130] [#1178], [DAT-15343] [#1172], [DAT-15511] [(#1173], [DAT-15753] [#1184], [DAT-15799] [#1202], [#1207], [#1266].

Structured Logging (Observability)

  • You can now add custom (user-defined) tags into your structured logs. These tags can be used later to segment your reporting. For instance, you can add tags that indicate the team, pipeline, or environment (and any other attributes that are meaningful to your organization) when reporting on Liquibase events.
    • Custom data is now included in every log message. This enables you to use dashboard queries and reports, which depend on these custom key:values pairs. [DAT-15572] [#1150]
    • Custom data can also be communicated to Liquibase via environment variables and property substitution. [DAT-15214] [#1165]
  • Security Improvement
    • Sensitive information is now obfuscated for people using passwords in their JDBC URL strings in structured logging. [DAT-15860] [#4902] [#1233]

Liquibase Open Source and Liquibase Pro

Liquibase capability enhancements

  • The generate-changelog and diff-changelog commands now support the --labels and --contextFilter arguments. The specified values will be included as attributes for each generated changeset. [DAT-14793] [#4660]
  • The diff, diff-changelog, and snapshot-reference commands now allow you to specify the referenceLiquibaseCatalogName and referenceLiquibaseSchemaName arguments. [#4352]
  • The update command summary reports that you can enable with the --show-summary argument can now be selectively sent to the console, log, or all with the --show-summary-output argument (prior to this release, they went to both the console and log). [#4395] [#4574]
  • The includeAll tag now supports an optional endsWithFilter attribute that directs Liquibase to only include files ending with the value specified by the new attribute. All other files located by the specified path attribute will be skipped and will not be included as deployable changes. [#4402]
  • The new removeChangeSetProperty Change Type makes it possible to use modeled changes (XML/YAML/JSON) that have limited support across database platforms. removeChangeSetProperty directs Liquibase to remove unavailable properties specified by the remove property from specific Change Types for the databases specified by the dbms property. removeChangeSetProperty will be applied to all Change Types in the changelog specified by the change property. [#3978]
    • <removeChangeSetProperty dbms="mysql, postgresql" change="addColumn" remove="afterColumn" />
  • Enhanced the history command output to include a column for any tags created by the Liquibase "tag" command. [DAT-15244] [#4805]
  • Enhanced modifyChangeSets to allow users to use both include and includeAll in the same changeset. Before this change, you could only use one or the other. [#4680]

User experience improvements

  • Liquibase changed how it tracks changes (the checksum algorithm) in 4.20.0. Some kinds of previously executed changes were being re-executed. This is now resolved—Liquibase will properly migrate those changes to the new checksum algorithm and no longer try to re-execute those changes. [#4762]
  • Detection of duplicate Liquibase Core and/or Commercial .jar files in your Liquibase installation and error message alerting you to this (unlikely) situation. [DAT-15837] [#4905]
  • Addressed issues that were keeping Liquibase from running on Windows installations where JAVA_HOME was not set. [#4803] [#4845]
  • Fixed a situation where Liquibase would not set the DATABASECHANGELOGLOCK before executing the update command when --changelog-lock-wait-time-in-minutes=0. The improvement ensures that Liquibase creates the DATABASECHANGELOGLOCK before command execution. [#4609]
  • The precondition check RowCountPrecondition now works correctly on tables containing more than Integer.MAX_VALUE (2147483647) rows. In previous releases, the check threw a NumericOverflow exception. [#4725]
  • Liquibase now correctly handles the case where the primaryKeyTablespace attribute of the constraints tag is an empty string. The generated SQL now correctly omits the USING INDEX TABLESPACE syntax. In previous releases, this syntax was incorrectly included in the generated SQL without a corresponding (and required) tablespace name. [#4441]
  • Increased tolerance of spaces in Formatted SQL changelogs. [DAT-15221] [#4625]

Maven integration improvements

  • The Maven integration now supports the logLevel property. This gives Maven integration users control over the severity level of log messages sent to the Liquibase logfile. [#4148]

Database platform improvements

MongoDB

  • MongoDB users can now manage their existing mongosh scripts with Liquibase by adding comments containing Liquibase directives. This makes it easy to bring the power of Liquibase change management into an existing project team using MongoDB.
  • For more information, see Liquibase MongoDB Pro 1.3.0 Release Notes.

SQL Anywhere

MySQL and MariaDB

  • MySQL and MariaDB now support default values in the snapshot command. [#4688]
  • MySQL now correctly maintains BIT(1) and TINYINT(1) data types. Prior to this improvement, MySQL Boolean incorrectly changed TINYINT(1) to BIT(1). [#4090]

Oracle

  • Liquibase now supports Oracle's new BOOLEAN data type that was released in Oracle 23c. Prior to this update, Liquibase converted the BOOLEAN data type to the type NUMBER(1). [#4579]
  • To improve compatibility, the Oracle JDBC driver was downgraded to the most recent long-term support (LTS) version, series 19.x. The previously shipped Oracle JDBC driver was a development version (version 23.x). [#4909] [#1237]

DB2 LUW

  • DB2 LUW performance improvements for the snapshot and diff commands. [#4799]
  • DB2 LUW now supports XML data types in the snapshot and diff commands. [DAT-12878] [#4827]
  • DB2 LUW now supports the replaceIfExists="true" attribute in createProcedure changesets, enabling Liquibase to create SQL with REPLACE OR EXISTS prepended to procedure definitions. [#4404]

DB2 z/OS

  • DB2 z/OS performance improvements for the snapshot and diff commands. [#4387]
  • DB2 z/OS now supports the replaceIfExists="true" attribute in createProcedure changesets, enabling Liquibase to create SQL with REPLACE OR EXISTS prepended to procedure definitions. [#4404]

PostgreSQL

  • Fix bug in PostgreSQL sequenceExists precondition validation check that caused it to return the incorrect result. [#4613]

H2

  • Update H2 to correctly support the database's reserved words for both H2 V1.0 and H2 V2.0. [#4052]
  • Fix in H2 for minor performance regression introduced in Liquibase 4.23.1 where the DATABASECHANGELOG table was initialized multiple times. It is now correctly initialized once, when the table doesn't already exist. [#4709]

HSQLDB

  • Fix in HSQLDB for minor performance regression introduced in Liquibase 4.23.1 where the DATABASECHANGELOG table was initialized multiple times. It is now correctly initialized once, when the table doesn't already exist. [#4709]

Performance improvements

  • Improved performance on all databases where Liquibase checks the table size (preconditions and snapshots). [#4834]
  • Improved Liquibase performance when managing large changelogs. [#4798]

JAVA API improvements