Spring Boot在Docker上运行 – Liquibase问题 (liquibase.exception.ValidationFailedException:)

huangapple go评论68阅读模式
英文:

Spring Boot running on Docker - Liquibase Issue (liquibase.exception.ValidationFailedException:)

问题

我遇到了在Docker上运行Spring Boot App时的问题。 这还涉及用于数据迁移的liquibase。

当我运行此命令(docker-compose up -d)时,出现了以下问题。

2023-06-19 17:19:10 Caused by: liquibase.exception.ValidationFailedException: Validation Failed:
2023-06-19 17:19:10      2 changesets check sum
2023-06-19 17:19:10           db/changelog/changes/1-ays-ddl.xml::1-ays-ddl::author was: 8:9eff502dc64e86c139e2705d0a5ad7f5 but is now: 8:6b1f7f790c04285a35dc3acd3e89a0f4
2023-06-19 17:19:10           db/changelog/changes/2-ays-dml.xml::2-ays-ddl::author was: 8:dc54e5ca8ce5cf11784d3d29ef0cd3c0 but is now: 8:f34f4332cdb9f4dd708875364cd476a0
2023-06-19 17:19:10

下面显示了变更集

<changeSet id="1-ays-ddl" author="author">
<changeSet id="2-ays-dml" author="author">

即使我删除了所有与此相关的图像,我仍然收到相同的错误消息。

我该如何解决这个问题?

英文:

I have a problem to run Spring Boot App on Docker. It covers also liquibase for data migration.

When I run this command (docker-compose up -d), I got this issue shown below.

2023-06-19 17:19:10 Caused by: liquibase.exception.ValidationFailedException: Validation Failed:
2023-06-19 17:19:10      2 changesets check sum
2023-06-19 17:19:10           db/changelog/changes/1-ays-ddl.xml::1-ays-ddl::author was: 8:9eff502dc64e86c139e2705d0a5ad7f5 but is now: 8:6b1f7f790c04285a35dc3acd3e89a0f4
2023-06-19 17:19:10           db/changelog/changes/2-ays-dml.xml::2-ays-ddl::author was: 8:dc54e5ca8ce5cf11784d3d29ef0cd3c0 but is now: 8:f34f4332cdb9f4dd708875364cd476a0
2023-06-19 17:19:10

Here are the changeSets shown below

<changeSet id="1-ays-ddl" author="author">
<changeSet id="2-ays-dml" author="author">

Even id I deleted all images related with it, I still get the same error message.

How can I fix it?

答案1

得分: 1

Liquibase 阻止应用程序启动,因为 2 个 changeset 的校验和已更改。
每当您修改已应用于数据库的任何 changeset 时,都会发生这种情况。
=> 回滚对这些 changeset 所做的任何更改,然后创建新的更改。

英文:

Liquibase prevvent the application from starting because the checksum of 2 changesets have change.
this will happen whenever you modify any changeset already applied to the database.
=> rollback any change done on these changesets then create new one

huangapple
  • 本文由 发表于 2023年6月19日 22:25:39
  • 转载请务必保留本文链接:https://go.coder-hub.com/76507563.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定