【发布时间】:2013-01-19 05:05:18
【问题描述】:
我的迁移目录结构如下:
db1:
- 最新/(触发器、函数、过程)
- 桌子/
- v000/master.xml
- update.xml
db1/update.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
<include file="v000/master.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>
db2:(尝试在此处包含 db1/update.xml)架构,因为我需要扩展/添加到 db1 架构)
- update.xml
db2/update.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
<include file="../db1/update.xml" />
</databaseChangeLog>
db1> liquibase --changeLogFile=update.xml 更新,成功
但是
db2 > liquibase --changeLogFile=update.xml 验证
显示 db1/v000/master.xml 中包含的表的验证错误
<include file="tables/12_createTable_audiences.xml" />
Error Reading Migration File:tables/12_createTable_audiences.xml .....
如果我通过以下更改修复错误(对于每个表:在 db1/v000/mater.xml 中)
<include file="../tables/12_createTable_audiences.xml" relativeToChangelogFile="true"/>
db2 > liquibase --changeLogFile=update.xml 验证/更新工作正常
但是
db2 > liquibase --changeLogFile=update.xml dbDocs ~/docs/db1
表 12_createTable_audiences.xml 失败
有谁知道如何解决这些(路径问题)?为什么 update 和 dbDoc 命令对相同的路径表现不同?
感谢您的支持。
【问题讨论】:
-
针对 liquibase 项目提出 JIRA 票
标签: migration database-migration liquibase