Upgrading from 2.0.5 to 3.2.0 - Problem with preConditions ?

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

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

Thanks. 3.2.1 is out now

Nathan

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

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 one column), and further we are deleting a view that is using this column that doesn’t exist. 

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. 

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,

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

 

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

objects :slight_smile:

Thanks in advance,

I also find this :

   

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,

What is the actual state of the database when you run this? Does the column PRICE_IDS exist? 

Steve DoniePrincipal Software Engineer
Datical, Inc. http://www.datical.com/

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.

Just to add more information:

  • We are using Oracle database 11g

this conditions are not working in 3.2.2

- columnExists  

  • 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,

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