# Upgrading from 2.0.5 to 3.2.0 - Problem with preConditions ?

**URL:** https://forum.liquibase.org/t/upgrading-from-2-0-5-to-3-2-0-problem-with-preconditions/3847
**Category:** Liquibase Development
**Created:** [July 7, 2014, 6:06pm UTC](https://forum.liquibase.org/t/upgrading-from-2-0-5-to-3-2-0-problem-with-preconditions/3847 "2014-07-07T18:06:00Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![enric.ballo](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@enric.ballo](https://forum.liquibase.org/u/enric.ballo)
#### Post date: [July 7, 2014, 6:06pm UTC](https://forum.liquibase.org/t/upgrading-from-2-0-5-to-3-2-0-problem-with-preconditions/3847/1 "2014-07-07T18:06:00Z")

</div>

I already saw in the forum one similar post, but i just created that one to show my scenario.&nbsp;

---

<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 7, 2014, 6:06pm UTC](https://forum.liquibase.org/t/upgrading-from-2-0-5-to-3-2-0-problem-with-preconditions/3847/2 "2014-07-07T18:06:00Z")

</div>

It seems to be working fine for me with the 3.2.1 version I am in final testing with. Try it with that version when it is out and let me know if you are still having problems.

Nathan

---

<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 7, 2014, 6:06pm UTC](https://forum.liquibase.org/t/upgrading-from-2-0-5-to-3-2-0-problem-with-preconditions/3847/3 "2014-07-07T18:06:00Z")

</div>

Thanks. 3.2.1 is out now

Nathan

---

<div class="post-metadata">

### Author: ![un1378880814576r10id](https://avatars.discourse-cdn.com/v4/letter/u/e480ec/32.png) [@un1378880814576r10id](https://forum.liquibase.org/u/un1378880814576r10id)
#### Post date: [July 7, 2014, 6:06pm UTC](https://forum.liquibase.org/t/upgrading-from-2-0-5-to-3-2-0-problem-with-preconditions/3847/4 "2014-07-07T18:06:00Z")

</div>

Thanks Nathan! I will try it when 3.2.1 is out and I will let you know if i have any problem.

---

<div class="post-metadata">

### Author: ![un1378880814576r10id](https://avatars.discourse-cdn.com/v4/letter/u/e480ec/32.png) [@un1378880814576r10id](https://forum.liquibase.org/u/un1378880814576r10id)
#### Post date: [July 7, 2014, 6:06pm UTC](https://forum.liquibase.org/t/upgrading-from-2-0-5-to-3-2-0-problem-with-preconditions/3847/5 "2014-07-07T18:06:00Z")

</div>

Hi Nathan,

I tested with the version 3.2.2 and is failing as well, but I think i know why is failing.

Checking the code and running step by step i saw that the liquibase script was wrong (too bad because it is on production already). We did some changes in a table (dropping&nbsp;one column), and further we are&nbsp;deleting&nbsp;a view that is using this column that doesn’t exist.&nbsp;

So the thing is that when we are going to delete the view the view it is already invalid, and with the version 2.0.5 the property if the viewExist, was working fine, but with the new version 3.2.2 i think because the object it is not valid it is not working anymore, and just fail.&nbsp;

Looking into our code I see that we are doing wrong, we should first drop the view and then remove the column in the table. But we didn’t release since this new version.

Can you confirm that the viewExist does this functionality ? check if exist and it is a valid object? for me it is not clear enough and i think should be ok if the object it is valid or not it is viewExists.

Thanks in advance,

---

<div class="post-metadata">

### Author: ![un1378880814576r10id](https://avatars.discourse-cdn.com/v4/letter/u/e480ec/32.png) [@un1378880814576r10id](https://forum.liquibase.org/u/un1378880814576r10id)
#### Post date: [July 7, 2014, 6:06pm UTC](https://forum.liquibase.org/t/upgrading-from-2-0-5-to-3-2-0-problem-with-preconditions/3847/6 "2014-07-07T18:06:00Z")

</div>

For now I found a work arround, and it is working fine:

SELECT count(\*)

FROM all\_objects t

 

WHERE

 

t.object\_type = ‘VIEW’

 

and t.object\_name = ‘PRV\_FTTH\_REQUESTS\_TO\_AP’;

  

 

 

Fix the upgrade version 2.0.5 -\> 3.2.2 Problem with viewExist

 

 

 

&nbsp;

 

But I would like to confirm if the view exists check only valid

 

objects 🙂

 

Thanks in advance,

---

<div class="post-metadata">

### Author: ![un1378880814576r10id](https://avatars.discourse-cdn.com/v4/letter/u/e480ec/32.png) [@un1378880814576r10id](https://forum.liquibase.org/u/un1378880814576r10id)
#### Post date: [July 7, 2014, 6:06pm UTC](https://forum.liquibase.org/t/upgrading-from-2-0-5-to-3-2-0-problem-with-preconditions/3847/7 "2014-07-07T18:06:00Z")

</div>

I also find this :

&nbsp; &nbsp;

This precondition with the version 3.2.2 it is not working for me, the column exists execute the changeSet and the result is MARK\_RAN and doesn’t rename the column. Any idea ?

Thanks in advance,

---

<div class="post-metadata">

### Author: ![un1382561729492r88id](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@un1382561729492r88id](https://forum.liquibase.org/u/un1382561729492r88id)
#### Post date: [July 7, 2014, 6:06pm UTC](https://forum.liquibase.org/t/upgrading-from-2-0-5-to-3-2-0-problem-with-preconditions/3847/8 "2014-07-07T18:06:00Z")

</div>

What is the actual state of the database when you run this? Does the column&nbsp;PRICE\_IDS exist?&nbsp;

Steve DoniePrincipal Software Engineer  
Datical, Inc. [http://www.datical.com/](http://www.datical.com/)

---

<div class="post-metadata">

### Author: ![un1378880814576r10id](https://avatars.discourse-cdn.com/v4/letter/u/e480ec/32.png) [@un1378880814576r10id](https://forum.liquibase.org/u/un1378880814576r10id)
#### Post date: [July 7, 2014, 6:06pm UTC](https://forum.liquibase.org/t/upgrading-from-2-0-5-to-3-2-0-problem-with-preconditions/3847/9 "2014-07-07T18:06:00Z")

</div>

Yes, the column PRICE\_IDS exists, and the precondition fail when i execute this code, and never execute the renameColumn… and of course other scripts depending on that change fail.

---

<div class="post-metadata">

### Author: ![un1378880814576r10id](https://avatars.discourse-cdn.com/v4/letter/u/e480ec/32.png) [@un1378880814576r10id](https://forum.liquibase.org/u/un1378880814576r10id)
#### Post date: [July 7, 2014, 6:06pm UTC](https://forum.liquibase.org/t/upgrading-from-2-0-5-to-3-2-0-problem-with-preconditions/3847/10 "2014-07-07T18:06:00Z")

</div>

Just to add more information:

- We are using Oracle database 11g

this conditions are not working in 3.2.2

-&nbsp;columnExists &nbsp;

- TableExists

(and maybe more)

Debugging the code, looks like is trying to find the table in the schema that you are executing (the one that you are executing), but doesn’t use the schema specified in the precondition.

We are running with RELEASE user and we want to check if the column exist in ATI schema… but i think it is not used the schemaName attribute.

Thanks in advance,

---

<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 7, 2014, 6:06pm UTC](https://forum.liquibase.org/t/upgrading-from-2-0-5-to-3-2-0-problem-with-preconditions/3847/11 "2014-07-07T18:06:00Z")

</div>

Thanks for the info, I’ll look into it more. I’m working on a large refactorign of the snapshot/precondition logic for 3.3 that will hopefully improve things.

Nathan
