SqlFile finds no file but does not fail

Identified by me as well.


No answers yet though. 




I have been trying to understand for hours why my changelog was being applied yet changes were not visible in the schema. After debugging the liquibase code I find that when an sql file is not found an empty statement is being sent to the DB! Is that really desired behavior?

What I see:

  1. The logging shows the files as 'executed' which is quite false!
  2. I get no error, warning, failures.
  3. When I run with updateSQL I see the DATABASECHANGELOG statements and nothing else.

How do I get this:

  1. have one changeset with one sqlFile block where I specify just the path
  2. I am running against an MSSQL server
  3. I am running on windows using Liquibase 3.1.1 and Java 1.7.0_51

This is annoying for regular changesets as it requires extra testing. It is very dangerous for runAlways changesets as it can result in non-deterministic behavior.

Have I missed something?



I did a bit of digging and as I thought this behavior has changed from 2.0.x to 3.1.x

in 2.0.x the SQLFileChange.java checks for the existence of the file.

in 3.1.x this functionality has been moved to Florian

Thanks for finding the bug. I assigned it to the 3.2.0 release.