Invalid content was found starting with element 'preConditions'

Hello,


I have a problem with liquibase-core-2.0.5


here is the changelog : 



<?xml version="1.0" encoding="UTF-8"?>

--

-

SELECT COUNT(*) FROM T_FRANCHISE Where FRA_IDENT=1238431.0

Checking if corresponding T_FRANCHISE exists

-<column value=“TEST” name=“FRA_COMMENTAIRES”/ FRA_IDENT=1238431.0

-

SELECT COUNT(*) FROM T_LIB_LANGUE Where TLLG_IDENT=1.30468702E8

Checking if corresponding T_LIB_LANGUE exists

-<span: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?


AFAIK there can be only one preConditions tag at the beggining of the changeSet. Your scenario is not supported. Workaround would be to divide this into two changeSets.

Thank you for the answer.


But if I want to use three changeSets for : 

      - Insert line1.

      - Update line 1.

      - Delete line1.

There will be two preconditions, the first in tne update changeSet, and the second in the Delete changeSet. And if I execute these changeSets in a MasterChangeSet, I saw in another topic of this forum that it’s gonna first look for preconditions in all the changeSets, then execute the first changeSet.


My problème is : I want to execute the first changeSet before the precondition in the second one.


Is there anything I can do?

You just need to break it up into two separate changeSets rather than just one.


Nathan