I have currently an issue with liquibase preconditions. I would like to insert something only if a precondition request does'nt answer 0 or null... I explain :
<changeSet id="myId" author="myName">
<preConditions onFail="MARK_RAN">
<sqlCheck expectedResult=????>SELECT COUNT(1) FROM tableB WHERE column2 IS NOT NULL;
</sqlCheck>
</preConditions>
<insert tableName="tableA">
<column name="column1" valueComputed="(SELECT columnA FROM tableB WHERE columnB IS NOT NULL;)" />
<column name="column2" valueComputed="(SELECT columnB FROM tableB WHERE columnB IS NOT NULL;)" />
</insert>
I would like for my changeSet to only be played if the first request give me a result. Is there a way to do that without a custom precondition ?
Thanks in advance