Liquibase modifysql标签与sql标签在同一个变更集中无法正常工作

时间:2018-05-11 05:56:10

标签: liquibase

  

liquibase:cvc-complex-type.2.4.a:找到无效的内容   与元素'sql'。之一   '{“http://www.liquibase.org/xml/ns/dbchangelog”:modifySql}'是   预期

为此变更集获取错误

<changeSet id="18.7.0.1-1-userTable" author="so">
    <preConditions onFail="MARK_RAN">
        <not>
            <tableExists tableName="USER_CURRENT"/>
        </not>
    </preConditions>
    <createTable tableName="USER_CURRENT">
        <column name="name" type="VARCHAR(20)">
            <constraints primaryKey="true" nullable="false" primaryKeyName="name"/>
        </column>

    </createTable>
    <modifySql dbms="mysql">
        <append value=" PARTITION BY KEY() PARTITIONS 16"/>
    </modifySql>
    <modifySql dbms="oracle">
        <append value=" ORGANIZATION INDEX PARTITION BY HASH (name) PARTITIONS 16 PARALLEL 4"/>
    </modifySql>
    <sql>GRANT SELECT ON USER_CURRENT TO 'reportsUser'@'%';</sql>       
</changeSet>

0 个答案:

没有答案