In Spring Boot 2.4.3 the mysql-connector-java version was updated to 8.0.23. This version contains a breaking change for DATETIME fields, see MySQL release notes.
The current Liquibase version (3.10.3) cannot handle this breaking change. When Liquibase fetches previous changesets a ClassCastException occurs for the datetime field it is trying to fetch. Liquibase fixed this issue in 4.3.1, see Liquibase changelog
Workaround
Override liquibase.version
in properties to 4.3.1
Sample project
I've attached an sample project (demo.zip) that reproduces the issue. Running "mvn verify" will reproduce the issue. Running it with "mvn verify -Pworks" runs the scenario that overrides the liquibase.version
.
Comment From: wilkinsona
Duplicates #25512 and #25401. There is also an open Liquibase pull request to fix the problem in 3.10.x: https://github.com/liquibase/liquibase/pull/1720. We'll pick up any Liquibase 3.10 release in due course.