includeAll uses full file path in databasechangelog

Description

Now that is fixed includeAll does find the changeSets but the full filepath is used in the DATABASECHANGELOG table.
Thus, running the script from different paths results in multiple executions of the same changelog.
I'm not sure whether this is wanted.

Environment

Windows/Linux

Activity

Show:

Nathan Voxland January 9, 2014 at 7:56 PM

Fixed.

It was a problem with relative paths and includeAll. If you have ran changeSets with builds that used the wrong logic, Liquibase will attempt to re-execute the changeSets because the path has now changed.

You can resolve the problem by setting a "logicalFilePath" in the included changeLogs equal to the full path as it was stored before, or by running a SQL call against DATABASECHANGELOG to strip off the extra portion of the path. The SQL will vary by database, but an example with mysql would be:

Jan Marten January 7, 2014 at 9:13 AM

I updated the demo:
https://github.com/LeovR/liquibaseIncludeAllError

The full path is inserted into the Databasechangelog.

I am using it on Windows. I'm not sure whether Linux behaves differently for this issue.

Nathan Voxland January 6, 2014 at 11:04 PM

The path used should be based on what your resource accessor used. You are running from maven and seeing it in the demo referenced in CORE-1531?

Fixed

Details

Reporter

Components

Fix versions

Affects versions

Priority

Created December 18, 2013 at 9:33 AM
Updated January 9, 2014 at 7:56 PM
Resolved January 9, 2014 at 7:56 PM