Hi,
will setting up a project to use liquibase I ran into the following problem.
Assuming I have the following folder structure:
c:/dev/build.xml
/database/master.xml
/views/vw_test1.sql
/views/vw_test1.sql
running my ant target containing:
<updateDatabase changeLogFile="./database/master.xml" outputFile="database/update.sql" ... />
and my master.xml containing following lines:
<include file="views/cst_reporting.sql" relativeToChangelogFile="true" />
<includeAll path="views/" relativeToChangelogFile="true" />
<includeAll path="views/" relativeToChangelogFile="true" />
I get something like this in the update.sql file:
INSERT INTO DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, LIQUIBASE) VALUES ('1', 'V_TEST1', 'database/views/vw_test1.sql, SYSTIMESTAMP, 1, '7:b513b79544ee26790f2a234b20501bde', 'sql', '', 'EXECUTED', '3.0.7');
INSERT INTO DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, LIQUIBASE) VALUES ('1', 'V_TEST1', 'C:/dev/./database/views/vw_test1.sq', SYSTIMESTAMP, 2, '7:b513b79544ee26790f2a234b20501bde', 'sql', '', 'EXECUTED', '3.0.7');
INSERT INTO DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, LIQUIBASE) VALUES ('1', 'V_TEST1', 'C:/dev/./database/views/vw_test1.sq', SYSTIMESTAMP, 2, '7:b513b79544ee26790f2a234b20501bde', 'sql', '', 'EXECUTED', '3.0.7');
The problem with that is the if we rerun the same script from another path, it will reexecuted.
Not a problem for replaceable objects, but for inserts, etc... this is a huge problem
I'm using liquibase 3.0.7
PS: of course, I dont want to include one file explicitly and then reinclude it using the includeAll. It's just for the exemple