Liquibase 4.26.0 release notes
Liquibase 4.26.0 is a major release. Liquibase 4.26.0 contains several notable changes for Liquibase Pro users: Advanced IF conditionals, simpler regex-based pattern checks, and checks reports.
See GitHub formatted release notes for more information. Full changelog: 4.25.1–4.26.0 (February 7, 2024)
Notable changes
Liquibase Pro
Liquibase Flow: Advanced IF conditionals
In Liquibase flow files, use AND (&&), OR (||), and NOT (!) logic options, in single or grouped conditions, as well as substring matching and checking if a key or file exists.
Learn more here: Flow files, Flow Conditionals, Flow Variables.
Policy checks: Simpler Regex-based pattern checks
Check four advanced patterns without figuring out the complicated regex needed to do it—supply the patterns, and policy checks will link and execute them.
Learn more here: PatternAFollowedByPatternB, PatternANotFollowedByPatternB, PatternANotPrecededByPatternB, and PatternAPrecededByPatternB.
Observability: Checks reports
With a new checks report, you can understand and share the data on the execution of policy checks. The summary section makes it easy to scan and understand your results. You can also analyze your checks by viewing details by changeset, check, and database. Finally, you can collaborate with your team with a shareable report.
Learn more here: Liquibase Observability, Checks Report.
Formatted SQL changelogs can use rollback scripts
Previously, formatted SQL ChangeLogs could only run in-line rollback commands. But, sometimes you need something more complex, like a full rollbackSqlFile. This functionality has been available for XML, JSON, and YAML formatted changelogs.
Liquibase Open Source and Liquibase Pro
Liquibase capability enhancements
The
diffChangeLog
command has been updated only to create a changelog when changes are detected. This is a change from the previous behavior of creating an empty changelog.Fix a bug that previously included substituted properties in the checksum calculation for SQLFile change types.
Adds two new
generate-changelog
options:--run-on-change-types=createView,createProcedure
will setrunOnChange="true"
for each changeset that contains solelycreateView
andcreateProcedure
changes. For backward compatibility, the default is an empty list. And--replace-if-exists=createView,createProcedure
will setreplaceIfExists="true"
for each createView
andcreateProcedure
changes. For backward compatibility, the default is an empty list.
JDBC driver updates
MariaDB JDBC driver updated from 3.2.0 to 3.3.2
Snowflake JDBC driver updated from 3.14.3 to 3.14.4
Firebird SQL JDBC driver updated from 5.0.2.java8 to 5.0.3.java8
SQLite JDBC driver updated from 3.43.2.2 to 3.44.1.0
Database platform improvements
General
Adds
create table if not exists
support for the following databases: CockroachDB, DB2 LUW, H2, HSQL, Informix, Ingres9, MariaDB, MySQL, Postgres, and SQLite.Fix the generated default column value in PostgreSQL and Oracle for char/clob data types.
MariaDB
Adds Liquibase support for MariaDB 10.10.6 and later's new UUID data type.
For boolean columns on MariaDB, revert the change made in Liquibase 4.25.1. It has been returned from TINYINT back to TINYINT(1).
DB2 z/OS
Improves support for the empty table precondition.
Java API changes
AbstractJdbcDatabase now delegates the execution of changes to the executor, which allows the executor more control over how changes are executed. This gives executors access to changes and changesets, enabling transaction commit management.
Failure exceptions in ChangeSet.execute are now logged as a SEVERE level for easier access to a concise error message.
Changelog
Liquibase Pro changelog
DAT-16531: Add labels, contexts, rollback-on-error to update reports runtime info in liquibase/liquibase-pro#1499 by @abrackx
DAT-15455: Refactor ChangelogRewriters to follow the general factory approach in liquibase/liquibase-pro#1195 by @vitaliimak
DAT-16675: Add aliases for init copy and project in liquibase/liquibase-pro#1488 by @StevenMassaro
DAT-16640: Add rollbackSqlFile to formatted SQL changelog parsing in liquibase/liquibase-pro#1501 by @StevenMassaro
DAT-16054: Implement filters for the snapshot command in liquibase/liquibase-pro#1440 by @wwillard7800
DAT-16282: Implement MVEL expression and added tests in liquibase/liquibase-pro#1382 by @wwillard7800
DAT-16684: Checks run report tweaks, add check packages info in liquibase/liquibase-pro#1491 by @abrackx
DAT-16273: Show fully qualified path in the console when generating a report in liquibase/liquibase-pro#1483 by @abrackx
DAT-13042: Parse LDAP-style URL to create SQLPLUS connection string in liquibase/liquibase-pro#1473 by @wwillard7800
DAT-16237: Styled checks run report in liquibase/liquibase-pro#1481 by @abrackx
DAT-16349: Make sure diffChangelog respects drift arguments in liquibase/liquibase-pro#1461 by @wwillard7800
DAT-16110: Implementation of regex helper checks in liquibase/liquibase-pro#1330 by @wwillard7800
DAT-16500: Do not clear a subset of MDC keys when the scope exits in liquibase/liquibase-pro#1447 by @StevenMassaro
DAT-16477: Append the command name to the default report name in liquibase/liquibase-pro#1456 by @abrackx
DAT-16482: Correctly set log-level on the Liquibase logger in liquibase/liquibase-pro#1433 by @wwillard7800
DAT-16397: Add the changeset identifier to exceptions thrown from LiquibaseSqlParser in liquibase/liquibase-pro#1443 by @StevenMassaro
DAT-16534: Fix issue with generate-changelog and diff-changelog in liquibase/liquibase-pro#1446 by @wwillard7800
DAT-16330: Remove the drift report mode parameter in liquibase/liquibase-pro#1423 by @wwillard7800
DAT-13864: New pending changeset filter for checks run in liquibase/liquibase-pro#1419 by @wwillard7800
DAT-16332: Add pending changes to the update report in liquibase/liquibase-pro#1438 by @abrackx
Liquibase Pro security, driver, and other updates
Bump com.oracle.database.jdbc:ojdbc8 from 19.20.0.0 to 19.21.0.0 #1339 by dependabot bot
Liquibase OSS changelog
New features
(#5525) Add labels, context, and rollback on error info to report (DAT-16531) @abrackx
(#5490) DAT-16675: Add support for command aliases @StevenMassaro
(#5406) Allow snapshot control creation to be overridden for snapshot filters DAT-16054 @wwillard7800
(#5256) Added exclusion for MVEL DAT-16282 @wwillard7800
(#5336) add default constructor + setters to RanChangeSet & related classes @rursprung
(#5340) Fixes #2352 by adding support for loading embedded jar files @hayeskl
(#5164) Write changelog only if changes exist @brachi-wernick
(#5360) Introduce support for primitive types in new changes @fbiville
(#5274) Use mariadb UUID when specify UUID type @mohamed-ahrrass-nw
(#5413) Add changeset identifier to exceptions thrown from LiquibaseSqlParser (DAT-16397) @StevenMassaro
(#5402) Adds pending changesets to update report (DAT-16332) @abrackx
(#3581) Support create table if not exists @taeyeon-Kim
(#4635) generate-ghangelog optionally creates runOnChange=true and replaceIfExists=true for createView changes @mkarg
Changes
(#5329) Support runWith executors committing after the changeset completes @dzeigler
(#5452) Log the exception in case of failure in ChangeSet.execute @bignoncedric
(#5043) Improve support for DB2[z] empty table precondition @MichaelKern-IVV
(#5424) Moved saved_state/compareGenerateSql.. directory from java source to resources bundle @MalloD12
(#5462) Map test containers to random available host port @StevenMassaro
(#5457) prevent multiple databases in test classes @StevenMassaro
(#5416) Do not clear a subset of MDC keys when scope exits (DAT-16500) @StevenMassaro
(#5417) Switch integration tests to use h2 where possible (DAT-16015) @StevenMassaro
(#5347) Added extra space for command help arguments display DAT-13864 @wwillard7800
Bug fixes
(#5522) MariaDB boolean: back to TINYINT(1) instead of TINYINT (MySQL) @famod
(#5524) Don't execute CustomSqlChanges to generate logs @Alf-Melmac
(#5498) Add missing OSGI settings @filipelautert
(#5391) fix SQLFileChange.generateCheckSum() to calculate checksum without property substitution @jglass524
(#5398) Fix issue #3516 addColumn ignores deleteCascade=true @andreiyusupau
(#5479) Do not skip over duplicate tags when doing rollback (DAT-16277) @StevenMassaro
(#5484) Workaround failing test containers startup for mysql by falling back to previous version. @abrackx
(#5397) Fix DatabaseFactory db loading when Database implementation is specified (fix for Issues 5371 & 5396 ) @dhsmith1001
(#5202) 4464 fix generated default column value using in PostgreSQL and Oracle for char/clob data types @LonwoLonwo
(#5350) Fix getSerializableFieldValue when dealing with rollback object @MalloD12
(#5414) Fix NPE in generateChangelog and diffChangelog DAT-16534 @wwillard7800
(#5267) Fix #5266 : Comma separated dbms-attribute for createProcedure-change triggers validation-check jclohmann