我需要创建一个变更日志前提条件,以便在失败时我可以停止我的变更日志并启动我的 grails 应用程序。
我需要满足的条件如下表所示,但我没有运气实现这样的先决条件。
我当前的尝试在这里
<preConditions onFail="HALT" onFailMessage="Version cannot be installed, please install an earlier version.">
<not>
<sqlCheck expectedResult="0">select count(*) from someTable WHERE id = 'someId'</sqlCheck>
</not>
<sqlCheck expectedResult="0">select count(*) from someTable</sqlCheck>
</preConditions>
Table populated | Row exists | Action
Y | Y | Run change log
X | X | Run change log
Y | X | Don't run
X | X | Run change log
最佳答案
我能够使用 grails 前提条件来满足不同的场景 http://grails-plugins.github.io/grails-database-migration/2.0.x/index.html#groovyPreconditions
关于mysql - Liquibase 更改日志前提条件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44003789/