0
votes

I have a sql-formatted changelog for liquibase. It contains a couple of changesets and each changeset has an uniquie id.

Then I execute liquibase with this changelog file, which reside, say in the directory /home/changelogs. The changes are applied. Then I run liquibase again with the same changelog file. As expected, the changes are not applied this time.

But if I then move my changelog file to say /home/changelog/migration and run liquibase again, the changes are applied.

The liquibase seems to include the path of changelog into decision, if a changeset already have been applied or not.

How can I get liquibase to make this decision only based on chageset-id, not respecting filepath?

Thanks a lot!

JeMo

1

1 Answers

3
votes

You'll want to use, logicalFilePath in the change log.

From the documentation,

Use to override the file name and path when creating the unique identifier of change sets. Required when moving or renaming change logs.

http://www.liquibase.org/documentation/databasechangelog.html

Should allow you to move the paths, file names etc. around.