【发布时间】:2011-01-15 06:24:19
【问题描述】:
我已将 future-rollback 标记添加到我的 ant 脚本中。我想要做的(我认为future-rollback 是我正在寻找的)是生成一个sql 回滚脚本,但不执行它(回滚脚本必须与sql 脚本一起交付 是来自的要求我的客户)。
我的变更日志文件有很多变更集,其中一些包含<sqlFile> 标记。
例如:
<databaseChangeLog ...>
<include file="latest/somesqlprocedure.xml" relativeToChangelogFile="true"/>
</databaseChangelog...>
latest/somesqlprocedure.xml 有一个sqlFile 标签。
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">
<sqlFile path="${changelog.dir}/latest/myprocedure.sql" splitStatements="false" />
</changeSet>
</databaseChangeLog>
当我运行 ant 脚本时,出现以下错误
liquibase.exception.ChangeLogParseException: 迁移文件无效:
<sqlfile path=${changelog.dir}/latest/myprocedure.sql>- 找不到文件
有人知道发生了什么吗?
这是 build.xml 文件的 sn-p
<target name="db-future-rollback" depends="init">
<rollbackFutureDatabase
changeLogFile="${db.changelog.file}"
driver="${database.driver}"
url="${database.url}"
username="${database.username}"
password="${database.password}"
outputfile="${database.rollback.dir}"
promptOnNonLocalDatabase="${prompt.user.if.not.local.database}"
classpathref="project.classpath"
>
</rollbackFutureDatabase>
</target>
提前致谢。
【问题讨论】: