Liquibase变换集只有preConditions

时间:2016-12-28 14:01:32

标签: sql liquibase

我需要添加changeSet只有preConditions标记,如果失败则停止执行。这是我的变更集:

<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.3.xsd">
    <changeSet id="GEO-6154_2" author="kadzhaev">
            <preConditions onFail="HALT">
                <sqlCheck expectedResult="0">select count(*) from "public"."messages" where key = 'branding.region.oktmo' and value != '';</sqlCheck>
            </preConditions>
    </changeSet>
</databaseChangeLog>

但它没有工作原因: liquibase: cvc-complex-type.2.4.a: Invalid content was found starting with element 'preConditions'.我想我应该在preConditions之后添加一些标签,但我不需要它。如何解决这个问题?

0 个答案:

没有答案
相关问题