使用liquibase diff命令的NumberFormatException

时间:2016-08-10 10:16:29

标签: diff liquibase

运行liquibase diff命令时出现NumberFormatException错误。我在这里错过了什么吗?

Unexpected error running Liquibase: liquibase.exception.DatabaseException: java.lang.NumberFormatException: For input string: "/****** Object:  Default dbo.Set_To_Zero    Script
te: 02/02/01 14:51:51 ******/
CREATE DEFAULT Set_To_Zero
        AS 0"
Command run: liquibase diff
<?xml version="1.0" encoding="UTF-8"?>
<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-3.4.xsd">
    <preConditions onFail = 'HALT'>
        <dbms type="mssql" />
    </preConditions>
    <changeSet author="liquibase-docs" id="sqlFile-example" >
        <comment>A sample change log 1</comment>
        <sqlFile
            endDelimiter="\nGO"
            path="updateEMP.sql"
            relativeToChangelogFile="true"/>
    </changeSet>
</databaseChangeLog>
--Contents of updateEMP.sql
update dbo.EMP set dob = getdate() where id = 1

提前致谢, 路旺

1 个答案:

答案 0 :(得分:0)

我认为你需要仔细检查你的命令。您发布的错误似乎与您发布的changelog和sql文件无关。你能展示你运行的liquibase命令行吗?