Changelog files + databasechangelog table: Does Liquibase treat id/author/file path as unique?
0 reputation · 08 Mar 2024, 09:43 UTC
In multi‑file Liquibase projects the same id and author can appear in several changelog files. The databasechangelog table records each execution, but the uniqueness rule that triggers duplicate warnings is not clearly documented.
Historically, some releases logged a warning when the same id and author were found in more than one file, yet the later instance was still executed. In newer releases the warning appears and the duplicate is skipped, suggesting that the file path may now be part of the key.
Because the uniqueness policy affects CI/CD pipelines that rely on idempotent migrations, an explicit answer is needed to decide whether to rename changesets or restructure changelog layout.
Specific questions:
- Does Liquibase consider the file path when determining the uniqueness of a changeset, in addition to
idandauthor? - Is there a configuration option to switch between (id, author) only versus (id, author, file path) uniqueness?
- How has this behavior changed across major Liquibase releases, and what are the implications for existing projects?