【发布时间】:2019-12-31 03:16:59
【问题描述】:
这是我正在查看的内容:
https://www.liquibase.org/documentation/includeall.html(这是使用includeAll标签)
https://www.dropwizard.io/en/release-1.3.x/manual/migrations.html(这是用于在我当前的 dropwizard 版本中配置 Liquibase)
注意第二个链接,它特别指出“您的数据库迁移存储在您的 Dropwizard 项目中,在 src/main/resources/migrations.xml 中”。
我的 migrations.xml 文件现在非常大,我想在一个新文件中启动新的变更集。我们称之为“migrations2.xml”。
我目前的结构是
--src
-- main
-- resources
-- migrations.xml
我改成
--src
-- main
-- resources
-- changelogs
-- migrations.xml
-- migrations2.xml
现在 migrations.xml 包含 <includeAll path="src/main/resources/changelogs/"/>
现在我在使用liquibase.exception.ChangeLogParseException: migrations.xml does not exist 运行迁移任务时遇到了问题
根据 dropwizard 文档,这是有道理的,因为它不再位于“src/main/resources”下。相反,它位于“src/main/resources/changelogs”中。我该如何解决这个问题,以确保它不是一个奇怪的结构,我必须保留包含 includeAll 标记的主要迁移 xml 文件在 changelogs 文件夹之外。
【问题讨论】: