in liquibase, there are 3 columns in the databasechangelog table, which uniquely identify a changeset and indicate if the changeset has been executed.
The columns are:
- ID
- AUTHOR
- FILENAME (the changelogs file path)
As Liquibase executes the databaseChangeLog, it reads the changeSets in order and, for each one, checks the “databasechangelog” table to see if the combination of id/author/filename has been run.
I am using liquibase in the context of automated deployment, so the filepaths of my changesets change constantly. The same changeset therefore executes over and over again, which is unwanted behaviour.
Is there a way to exclude the filename from the combination that is the unique identifier of a changeset? I basically want liquibase to use ID and Author only.
Thank you
Kind regards,
Tobias
I think all you need to do is edit the changelog so that it has the
logicalFilePath
attribute set. Here's an example:It is also possible to set the
logicalFilePath
attribute on individual changesets if necessary.Some good forum posts on this as well: http://forum.liquibase.org/topic/i-need-to-ignore-the-filename-in-the-processing-to-see-if-a-change-set-has-already-been-applied