Update of spring boot project - problem with liquibase arises

Viewed 486

I have updated a project which worked with

  • Spring Boot version 2.3.9
  • liqubase-core version 2.3.9
  • liquibase-maven-plugin 3.6.3
  • liquibase-hibernate5 3.6

to the versions

  • Spring Boot version 2.5.6.
  • liquibase dependencies to 4.6.1

The problem is the following: There are several old migration files that have a timestamp(29). Now the PostgreSQL database reports the following exception:

Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set: Reason: liquibase.exception.DatabaseIncapableOfOperation: Using a TIMESTAMP data type with a fractional precision of 29 is not supported on postgresql: A timestamp datatype with 29 fractional digits was requested, but PostgreSQL only supports 6 digits.

I don't want to have to change the precision of the timestamps in the migration files (or as a consequence their md5 hash values). So my question is if anybody knows another way to get rid of this error message without adjusting the length of the timestamps in the migration file?

1 Answers

I thnik that you can change migration files, and start you app on a new database for getting a new databasechangelog content, then replace the old databasechangelog.

Related