So I have liquibase scripts for my spring boot application (3.3.8) liquibase 4.27.0 It works if files in resource directory.
But my pipeline takes liquibase scripts from root directory /pipeline/dbscripts/liquibase and execute in before deploy.
So, for local development I set path to scripts
spring:
liquibase:
enabled: true
change-log: file:./pipeline/dbscripts/liquibase/db.changelog-master.yaml
But now I get exception:
Caused by: liquibase.exception.UnexpectedLiquibaseException: Could not determine path for
file:/home/<userDir>/IdeaProjects/project/pipeline/dbscripts/liquibase/changelog/2025/03/202503031455-create-table.yaml
File exists in directory
====
Found extra information
If main chanelog with includeAll => exception
databaseChangeLog:
- includeAll:
path: ./changelog
relativeToChangelogFile: true
If it contain only include. it works
databaseChangeLog:
- include:
file: ./changelog/2025/03/202503031455-create-table.yaml
relativeToChangelogFile: true
So I have liquibase scripts for my spring boot application (3.3.8) liquibase 4.27.0 It works if files in resource directory.
But my pipeline takes liquibase scripts from root directory /pipeline/dbscripts/liquibase and execute in before deploy.
So, for local development I set path to scripts
spring:
liquibase:
enabled: true
change-log: file:./pipeline/dbscripts/liquibase/db.changelog-master.yaml
But now I get exception:
Caused by: liquibase.exception.UnexpectedLiquibaseException: Could not determine path for
file:/home/<userDir>/IdeaProjects/project/pipeline/dbscripts/liquibase/changelog/2025/03/202503031455-create-table.yaml
File exists in directory
====
Found extra information
If main chanelog with includeAll => exception
databaseChangeLog:
- includeAll:
path: ./changelog
relativeToChangelogFile: true
If it contain only include. it works
databaseChangeLog:
- include:
file: ./changelog/2025/03/202503031455-create-table.yaml
relativeToChangelogFile: true
Share
Improve this question
edited Mar 4 at 11:32
Shakirov Ramil
asked Mar 4 at 11:15
Shakirov RamilShakirov Ramil
1,5541 gold badge12 silver badges16 bronze badges
1 Answer
Reset to default 0I don't believe Liquibase will recurse through a directory structure to look for changelogs includeAll
. Since the changelog you are referencing is in ./changelog/2025/03
. I would try switching the specification in ./pipeline/dbscripts/liquibase/db.changelog-master.yaml
from:
databaseChangeLog:
- includeAll:
path: ./changelog
relativeToChangelogFile: true
to:
databaseChangeLog:
- includeAll:
path: ./changelog/2025/03 // <=full relative path to file
relativeToChangelogFile: true
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745047737a4608198.html
评论列表(0条)