FILENAME column in databasechangelog table.

Hi,

We have upgraded liquibase version from 3.1.1 to 3.2.0. We see there is a difference in how FILENAME column gets updated when we have includeAll tag in the xml between v3.1.1 and v3.2.0. Here's is the sample changelog table contents from same changeset executed first using 3.1.1 and then using 3.2.0:

122 sr
/app/test/staging/sets/misc/3.1/3.1_0000003.sql 07-DEC-14
10.49.33.220426000 19 EXECUTED
7:a5cce35c1ae67b7d8fd18fbc0ee08c5c sql 3.2.0

121 sr
/app/test/staging/sets/misc/3.1/3.1_0000002.sql 07-DEC-14
10.49.33.204243000 18 EXECUTED
7:7b85268acc885c1f1c1617ce31f18522 sql 3.2.0

120 sr
/app/test/staging/sets/misc/3.1/3.1_0000001.sql 07-DEC-14
10.49.33.187842000 17 EXECUTED
7:938bc2375ef63ff27920137f9f83730d sql 3.2.0

122 sr ./misc/3.1/3.1_0000003.sql 07-DEC-14
10.45.53.996480000 16 EXECUTED
7:a5cce35c1ae67b7d8fd18fbc0ee08c5c sql 3.1.1

121 sr ./misc/3.1/3.1_0000002.sql 07-DEC-14
10.45.53.840490000 15 EXECUTED
7:7b85268acc885c1f1c1617ce31f18522 sql 3.1.1

120 sr ./misc/3.1/3.1_0000001.sql 07-DEC-14
10.45.53.663875000 14 EXECUTED
7:938bc2375ef63ff27920137f9f83730d sql 3.1.1


Ideally it shouldn't have executed the changesets using 3.2.0 but it went ahead executed them. These were insert statements in the table with no PK in it. Though the checksum of the changesets are same it seems the contents of FILENAME column are also part of the check whether to execute the changeset or not(the difference here is that 3.1.1 was updating this column with relative path while 3.2.0 is updating the column with absolute path for the same changelog.xml).

Here's another example of running same changeset from two different directories which has includeAll tag in it, this time using v3.2.0:

001 ascii /export/home/test/artifact_ascii/dir1/dml/test.sql 08-DEC-14 06.25.09.254245000 AM 13 EXECUTED 7:947f0f826d55db5a01a1fb3cca13d2fc sql 3.2.0 001 ascii /export/home/test/artifact_ascii/dir2/dml/test.sql 08-DEC-14 06.32.00.109212000 AM 14 EXECUTED 7:947f0f826d55db5a01a1fb3cca13d2fc sql 3.2.0

I am wondering if we have any option in 3.2.0 to limit the FILENAME column to be updated just with relative path when we are using includeAll Path tag in the xml.

Please advise.

Yes, the filename is part of the unique changeset identifier. Can you post an example of the changeSets you are using? Also, was there a change in how you called liquibase from your 3.1 to 3.2 usage?

Nathan

Nathan, do you need any other information on this? I am wondering if there is any particular reason for making this change in the code.

Hi Nathan,


Here are the command we executed:


java -jar /app/liquibase-3.2.0-bin/liquibase.jar --defaultsFile=./liquibase.properties --logLevel=info --changeLogFile=./db-changelog-R3.0.xml update java -jar /app/liquibase-3.1.1-bin/liquibase.jar --defaultsFile=./liquibase.properties --logLevel=info --changeLogFile=./db-changelog-R3.0.xml update


the changeLogFile contents are:

<?xml version="1.0" encoding="UTF-8"?>

<databaseChangeLog




Hi Nathan,

Any feedback on this further?

Thanks.

Wondering if anyone can shed some light on this.

Sorry for the slow response. Have you tried it with Liquibase 3.3.2? When I try replicating your setup, it is checking files with the relative path. It may have been something fixed in 3.3.

If you run ‚Äúselect * from databasechangelog‚ÄĚ you should see the path value containing what is stored. If you run liquibase updateSql it will output the path it will try to insert into the databasechangelog table. How do they differ?

Nathan