Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Invalid content was found starting with element 'preConditions'

$
0
0
Hello,

I have a problem with liquibase-core-2.0.5

here is the changelog : 


<?xml version="1.0" encoding="UTF-8"?>
-<databaseChangeLog xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.liquibase.org/xml/ns/dbchangelog">-<changeSet id="1802" author="">
-<preConditions onFail="HALT">
<sqlCheck expectedResult="1">SELECT COUNT(*) FROM T_FRANCHISE Where FRA_IDENT=1238431.0</sqlCheck>
</preConditions>
<comment>Checking if corresponding T_FRANCHISE exists</comment>
-<update tableName="T_FRANCHISE"><column value="TEST" name="FRA_COMMENTAIRES"/ <where>FRA_IDENT=1238431.0</where></update>
-<preConditions onFail="HALT">
<sqlCheck expectedResult="1">SELECT COUNT(*) FROM T_LIB_LANGUE Where TLLG_IDENT=1.30468702E8</sqlCheck>
</preConditions><comment>Checking if corresponding T_LIB_LANGUE exists</comment>
-<update tableName="T_LIB_LANGUE"><column value="test " name="TLLG_LIBELLE"/>           <where>TLLG_IDENT=1.30468702E8</where>
</update>
</changeSet>
</databaseChangeLog>

and here is the output

Error parsing line 1 column 685 of C:/P9/changeLogs/20.xml: cvc-complex-type.2.4.a: Invalid content was found starting with element 'preConditions'. One of '{"http://www.liquibase.org/xml/ns/dbchangelog":comment, "http://www.liquibase.org/xml/ns/dbchangelog":createTable, "http://www.liquibase.org/xml/ns/dbchangelog":dropTable, "http://www.liquibase.org/xml/ns/dbchangelog":createView, "http://www.liquibase.org/xml/ns/dbchangelog":renameView, "http://www.liquibase.org/xml/ns/dbchangelog":dropView, "http://www.liquibase.org/xml/ns/dbchangelog":insert, "http://www.liquibase.org/xml/ns/dbchangelog":addColumn, "http://www.liquibase.org/xml/ns/dbchangelog":sql, "http://www.liquibase.org/xml/ns/dbchangelog":createProcedure, "http://www.liquibase.org/xml/ns/dbchangelog":sqlFile, "http://www.liquibase.org/xml/ns/dbchangelog":renameTable, "http://www.liquibase.org/xml/ns/dbchangelog":renameColumn, "http://www.liquibase.org/xml/ns/dbchangelog":dropColumn, "http://www.liquibase.org/xml/ns/dbchangelog":mergeColumns, "http://www.liquibase.org/xml/ns/dbchangelog":modifyDataType, "http://www.liquibase.org/xml/ns/dbchangelog":createSequence, "http://www.liquibase.org/xml/ns/dbchangelog":alterSequence, "http://www.liquibase.org/xml/ns/dbchangelog":dropSequence, "http://www.liquibase.org/xml/ns/dbchangelog":createIndex, "http://www.liquibase.org/xml/ns/dbchangelog":dropIndex, "http://www.liquibase.org/xml/ns/dbchangelog":addNotNullConstraint, "http://www.liquibase.org/xml/ns/dbchangelog":dropNotNullConstraint, "http://www.liquibase.org/xml/ns/dbchangelog":addForeignKeyConstraint, "http://www.liquibase.org/xml/ns/dbchangelog":dropForeignKeyConstraint, "http://www.liquibase.org/xml/ns/dbchangelog":dropAllForeignKeyConstraints, "http://www.liquibase.org/xml/ns/dbchangelog":addPrimaryKey, "http://www.liquibase.org/xml/ns/dbchangelog":dropPrimaryKey, "http://www.liquibase.org/xml/ns/dbchangelog":addLookupTable, "http://www.liquibase.org/xml/ns/dbchangelog":addAutoIncrement, "http://www.liquibase.org/xml/ns/dbchangelog":addDefaultValue, "http://www.liquibase.org/xml/ns/dbchangelog":dropDefaultValue, "http://www.liquibase.org/xml/ns/dbchangelog":addUniqueConstraint, "http://www.liquibase.org/xml/ns/dbchangelog":dropUniqueConstraint, "http://www.liquibase.org/xml/ns/dbchangelog":customChange, "http://www.liquibase.org/xml/ns/dbchangelog":update, "http://www.liquibase.org/xml/ns/dbchangelog":delete, "http://www.liquibase.org/xml/ns/dbchangelog":loadData, "http://www.liquibase.org/xml/ns/dbchangelog":loadUpdateData, "http://www.liquibase.org/xml/ns/dbchangelog":executeCommand, "http://www.liquibase.org/xml/ns/dbchangelog":stop, "http://www.liquibase.org/xml/ns/dbchangelog":rollback, WC[##other:"http://www.liquibase.org/xml/ns/dbchangelog"], "http://www.liquibase.org/xml/ns/dbchangelog":modifySql}' is expected.

It work where there is only one precondition. But not where there are two like in this example.

Can you help me please?


Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>