Skip to main content

Check to see if a database exists in a project

Hi,
 
I'm writing a scriptlet to add a column to an IDEA database. I'd like to make sure the database exists before I try to add the field to it!
I don't see a way to test for the existance of the database as part of a project.
I'm new to IDEA, so this may be an obvious question, so I apologise in advance!
Thanks for your help! 
 
Rob
 
 
 
 

Brian Element Thu, 09/25/2014 - 12:38

Hi Rob, what you have to do is think of the database as a normal file and check to see if the file exists.  I already have some code that does this, you can find it here.