Rag*_*dya 4 java postgresql liquibase
当我尝试运行以下命令时:
java -jar liquibase-3.4.1.jar --classpath=postgresql-9.2-1004.jdbc4.jar --logLevel=severe --url=jdbc:postgresql://localhost/raritan --username=<USER>--password=<PWD> --changeLogFile=master_changelog.xml update
Run Code Online (Sandbox Code Playgroud)
我得到以下异常:
SEVERE 8/29/16 12:46 PM: liquibase: Error parsing line 7 column 35 of changelogdropViews.xml: cvc-enumeration-valid: Value 'CONTINUE' is not facet-valid withespect to enumeration '[HALT, WARN]'. It must be a value from the enumeration. liquibase.exception.ChangeLogParseException: iquibase.exception.SetupException
Error parsing line 7 column 35 of changelog_dropViews.xml: cvc-enumeration-val
d: Value 'CONTINUE' is not facet-valid with respect to enumeration '[HALT, WARN
'. It must be a value from the enumeration.
Run Code Online (Sandbox Code Playgroud)
这是我的变更日志文件:
<?xml version="1.0" ?>
<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">
<preConditions onFail="CONTINUE">
<sqlCheck expectedResult="1">select count(1) from pg_extension where extname='plsh'</sqlCheck>
</preConditions>
Run Code Online (Sandbox Code Playgroud)
有关先决条件,请参阅文档: http://www.liquibase.org/documentation/preconditions.html
那里说:
在变更集之外(例如,在变更日志的开头),只有 HALT 和 WARN 是可能的值。