【发布时间】:2015-08-23 20:58:45
【问题描述】:
目前我尝试将 Liquibase 3.3.3 集成到我的项目中。为了管理我的数据库,我从我的应用程序中调用 Liquibase,而变更集位于一个 JAR 文件中,其中
final Liquibase liquibase = new Liquibase( "db/db_changelog_master.xml",
new ClassLoaderResourceAccessor(),
database );
liquibase.update( new Contexts() );
此调用有效,主变更集已加载。在主变更集中加载更多变更集:
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
<include file="classpath:db_changelog_1.0.xml"/>
</databaseChangeLog>
问题从这里开始,因为 Liquibase 无法找到并加载子变更集。我还尝试了
有什么建议吗?
最好的问候!
【问题讨论】:
-
也许您应该添加更改日志文件的文件夹结构。
db_changelog_1.0.xml是否也在db文件夹中?你试过/db/db_changelog_1.0.xml和/db_changelog_1.0.xml和db/db_changelog_1.0.xml吗? -
您找到解决方案了吗?