0
votes

liquibase: cvc-complex-type.2.4.a: Invalid content was found starting with element 'sql'. One of '{"http://www.liquibase.org/xml/ns/dbchangelog":modifySql}' is expected.

Getting an error for this changeset

<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>
1
Hi Bhadra, welcome to SO. Please format and proofread your questions. Also look here to learn how to ask properly: stackoverflow.com/help/how-to-askpetezurich

1 Answers

0
votes

The reason for it is that you can't have sql after modifySql tag inside the changeSet. You'll have either to put sql before modifySql or just to separate them into different changeSets.

It follows from dbchangelog-3.1.xsd.