本文介绍了Liquibase校验和验证错误,无任何更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即使未对变更集进行任何更改,Maven也会触发liquibase验证失败.

Maven fires liquibase validation fail even no changes was made in changeset.

我的数据库是oracle.

My database is oracle.

情况:

  1. 在数据库变更日志表中记录了变更集<changeSet id="1" author="me" dbms="oracle">;

然后我错误地添加了另一个变更集<changeSet id="1" author="me" dbms="hsqldb">

Then by mistake i added another changeset <changeSet id="1" author="me" dbms="hsqldb">

重新运行的liquibase脚本Maven触发了校验和验证错误.

Reruned liquibase scripts Maven fired checksum validation error.

然后我将hsqldb changeSet更改为<changeSet id="2" author="me" dbms="hsqldb">

Then i changed hsqldb changeSet to <changeSet id="2" author="me" dbms="hsqldb">

Maven仍会触发校验和验证错误.

Maven still firing checksum validation error.

然后我将数据库中的第一个changeSet校验和手动更改为当前的checkSum和成功运行的脚本.

Then i changed first changeSet checksum in DB manually to current checkSum and scripts runned successfully.

一切看起来都很不错,但是当我重新部署整个应用程序并运行liquibase脚本时,第一个changeSet的校验和仍然像第6步之前一样.

Everything looks nice ,but when i redeploy whole application and run liquibase scripts checksum of first changeSet is still like before 6 step.

推荐答案

如果您确信脚本正确反映了数据库中应该的内容,请运行 liquibase:clearCheckSums maven目标,它将清除所有目标.

If you're confident that your scripts correctly reflect what should be in the database, run the liquibase:clearCheckSums maven goal, which will clean it all up.

这篇关于Liquibase校验和验证错误,无任何更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-07 12:13