I’m trying to figure out how to include a SQL file that exists in a sibling directory. For instance, if I have the following structure:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error setting up or running Liquibase: Invalid Migration File: <sqlfile path=changelog/r4.3.000.000/iteration-1-16/…/
…/objects/Scripts/exec_sync_user_sequences.sql> -Unable to read file
It looks like it doesn’t recognize the relative path. Am I doing something wrong?
Thanks!
If you are calling it from command line I believe everything is relative from where you are when you called it. I’ve only been using liquibase for a little while but I THINK if you call it in root then the path needs to be Suneet
Thanks so much for your help, Suneet. I think in the end the problem was introduced by the fact that I was using Maven to execute liquibase.
After posting I found this little blurb in the manual (http://www.liquibase.org/manual/maven):
DatabaseChangeLogs to be present in other Maven artifacts (on the classpath) and able to be used to invoke liquibase on a database.
This seems to suggest I need to use either classpath-based pathing or absolute. Once I changed to classpath-based, everything worked.
I’m not sure if my assertion above is correct, but the above solution is sufficient for my needs.
Thanks again!
That assertion is correct, the classpath-based pattern is the most flexible and safest.
Nathan