# Migration failed because of preCondition failing

**URL:** <https://forum.liquibase.org/t/migration-failed-because-of-precondition-failing/128>\
**Category:** General Discussion\
**Created:** [July 9, 2009, 8:22am UTC](https://forum.liquibase.org/t/migration-failed-because-of-precondition-failing/128 "2009-07-09T08:22:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbijkerk](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@rbijkerk](https://forum.liquibase.org/u/rbijkerk)\
**Post date:** [July 9, 2009, 8:22am UTC](https://forum.liquibase.org/t/migration-failed-because-of-precondition-failing/128/1 "2009-07-09T08:22:00Z")

</div>

Hi,

I saw some forum posts related on this issue but I couldn’t find a solution to my specific problem.

I’m using liquibase 1.9.3 in combination with an oracle XE 10 database.

The problem I have is that my complete migration is failing because 1 precondition is not met. I would like my migration to continue with the next files instead of completely failing.

According to the tutorial I found on working with an oracle database I’m trying the following scenario:

in my update.xml file I have:

[sub]\<?xml version="1.0" encoding="UTF-8" standalone="no"?\>  
\<databaseChangeLog xmlns=“[http://www.liquibase.org/xml/ns/dbchangelog/1.9”](http://www.liquibase.org/xml/ns/dbchangelog/1.9%22)  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlns:xsi=“[http://www.w3.org/2001/XMLSchema-instance”](http://www.w3.org/2001/XMLSchema-instance%22)  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xsi:schemaLocation=“[http://www.liquibase.org/xml/ns/dbchangelog/1.9](http://www.liquibase.org/xml/ns/dbchangelog/1.9) [http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd”\>](http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd%22>)  
&nbsp; &nbsp;   
&nbsp; &nbsp;   
[/sub]

and in v000\master.xml I added which is currently in my databasechangelog table

in both master.xml files I use a preCondition like this:  
v000:  
[sup]&nbsp;   
&nbsp; &nbsp; &nbsp; &nbsp;   
&nbsp; &nbsp; &nbsp; &nbsp;   
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SELECT NVL(MAX(id),0)  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM databasechangelog  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WHERE author=‘MajorVersion’  
&nbsp; &nbsp; &nbsp; &nbsp;   
&nbsp; &nbsp; [/sup]  
and v001:  
[sup]&nbsp; &nbsp;   
&nbsp; &nbsp; &nbsp; &nbsp;   
&nbsp; &nbsp; &nbsp; &nbsp;   
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SELECT NVL(MAX(id),0)  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM databasechangelog  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WHERE author=‘MajorVersion’  
&nbsp; &nbsp; &nbsp; &nbsp;   
&nbsp; &nbsp; [/sup]

when I run the update.xml I would expect that only the v001\master.xml is performed because the preCondition in v000\master.xml will evaluate to false. But instead I get:  
Migration Failed: Validation Failed:  
&nbsp; &nbsp; 1 preconditions failed  
&nbsp; &nbsp; update.xml : SQL Precondition failed.&nbsp; Expected ‘0’ got ‘1’  
.&nbsp; For more information, use the --logLevel flag)

Is this a bug? Or am I doing something wrong?

Any pointers and/or help would be greatly appreciated.

Best regards  
Ruud

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [July 9, 2009, 8:22am UTC](https://forum.liquibase.org/t/migration-failed-because-of-precondition-failing/128/2 "2009-07-09T08:22:00Z")

</div>

I think I see where the problem is.&nbsp; We’ll get it fixed for the next release: [http://liquibase.jira.com/browse/CORE-418](http://liquibase.jira.com/browse/CORE-418)

Nathan

---

<div class="post-metadata">

**Author:** ![rbijkerk](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@rbijkerk](https://forum.liquibase.org/u/rbijkerk)\
**Post date:** [July 9, 2009, 8:22am UTC](https://forum.liquibase.org/t/migration-failed-because-of-precondition-failing/128/3 "2009-07-09T08:22:00Z")

</div>

Great,

Thanks

Ruud
