# Liquibase update fails due to filename changes after directory restructuring

**URL:** <https://forum.liquibase.org/t/liquibase-update-fails-due-to-filename-changes-after-directory-restructuring/10719>\
**Category:** General Discussion\
**Created:** [December 9, 2025, 8:21am UTC](https://forum.liquibase.org/t/liquibase-update-fails-due-to-filename-changes-after-directory-restructuring/10719 "2025-12-09T08:21:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![godo57](https://avatars.discourse-cdn.com/v4/letter/g/dc4da7/32.png) [@godo57](https://forum.liquibase.org/u/godo57)\
**Post date:** [December 9, 2025, 8:21am UTC](https://forum.liquibase.org/t/liquibase-update-fails-due-to-filename-changes-after-directory-restructuring/10719/1 "2025-12-09T08:21:25Z")

</div>

We use Liquibase to manage our database deployments, and we recently had to restructure our project directories.

After the restructuring, we encountered Liquibase issues during the first `liquibase update`, due to the `databasechangelog.filename` column. The values stored in this column no longer match the actual changelog paths in the filesystem.

We cannot use the `logicalFilePath` attribute because the file path depends on the environment, and as far as I know, [property substitution](https://docs.liquibase.com/pro/user-guide-4-33/what-is-property-substitution), does not work for this field.

I see three possible solutions, and I would like to know which one is recommended:

## Solution 1

Run a `liquibase changelog-sync` right after the project restructuring. This would mark all changesets as already executed. However, this will result in two entries per changeset in the `databasechangelog` table (one with the old filename, one with the new one). Would rollbacks still work correctly in this scenario?

## Solution 2

Directly update the `databasechangelog.filename` column to match the new paths across all databases. But I’m unsure whether this could cause side effects, especially with MD5 checksum validation or other internal mechanisms. Is this safe?

## Solution 3

Manually set the `logicalFilePath` in each changelog file right before running `liquibase update`, adapting the path based on the environment. This might work, but we’re concerned about running Liquibase against changelog files that differ from the version in source control.

---

<div class="post-metadata">

**Author:** ![daryldoak](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/daryldoak/32/764_2.png) [@daryldoak](https://forum.liquibase.org/u/daryldoak)\
**Post date:** [December 9, 2025, 1:57pm UTC](https://forum.liquibase.org/t/liquibase-update-fails-due-to-filename-changes-after-directory-restructuring/10719/2 "2025-12-09T13:57:19Z")

</div>

Hello.

I have personally used options 1 and 2, without issues.

For option 1 I recommend truncating the databasechangelog table before running changelog-sync.

I highly recommend tested any scenario in a test database prior to implementing in a prod database.
