【发布时间】:2017-12-31 20:36:59
【问题描述】:
我正在尝试使用标记数据库以供将来回滚,但出现以下错误:
将更新应用到数据库。这可能需要几分钟的时间 ... 运行 Liquibase 时出现意外错误:解析 ppsdb/ebidb_lb_upgrade_c43_sql_1.xml 的第 12 行第 6 列时出错:cvc-complex-type.2.4.a:发现以元素“sql”开头的无效内容。需要 '{"http://www.liquibase.org/xml/ns/dbchangelog/1.9":modifySql}' 之一。
这是我的变更集文件:
cat ebidb_lb_upgrade_c43_sql_1.xml
<?xml version="1.0" encoding="UTF-8"?>
<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">
<changeSet author="avnish_plsql_upgrade" id="1">
<tagDatabase tag="version_1.3"/>
<sql
stripComments="false"
>
create table test (id number);
</sql>
</changeSet>
</databaseChangeLog>
当我从文件中删除 tagDatabase 标记时,我没有收到任何错误。 只有当我添加这个标签时,我才会遇到错误。 如果我在这里遗漏任何东西或犯任何错误,请告诉我。
【问题讨论】:
标签: database version-control liquibase