我使用 sqlFile 包含一个 sql 脚本,该脚本使用 oracle 特定命令(NOCACHE、NO PARALLEL 等)创建表。我的 master.xml 文件包含所有 sql 脚本并执行它们。但是,当它检测到标签时,它会失败并打印此错误消息。
C:\update.bat master.xml
Migration Failed: cvc-complex-type.2.4.a: Invalid content was found starting with element 'sqlFile'.
One of '{
"http://www.liquibase.org/xml/ns/dbchangelog/1.9":preConditions,
"http://www.liquibase.org/xml/ns/dbchangelog/1.9":property,
"http://www.liquibase.org/xml/ns/dbchangelog/1.9":changeSet,
"http://www.liquibase.org/xml/ns/dbchangelog/1.9":include,
"http://www.liquibase.org/xml/ns/dbchangelog/1.9":includeAll
}' is expected.
我的 master.xml 很简单
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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="createUsers.sql"/>
</databaseChangeLog>
任何想法将不胜感激。提前致谢。