无法使用liquibase更新数据库

时间:2015-02-23 11:15:21

标签: java ant liquibase

我最近将 liquibase 二进制文件更新为 3.3.2 版本。之后,使用liquibase无法在数据库中进行更新。 以下是build.xml中的 ANT 目标。

<target name="update-structure" depends="prepare">
        <updateDatabase changeLogFile="${liquibase.changelog.file.structure}" classpathref="classpath">
        <database id="my-database"  driver="${db.driver}" url="${db.url}" user="${db.username}" password="${db.pasword}"/>
        </updateDatabase>
</target>

当我使用命令行在build.xml中构建目标时,我收到以下错误。

[updateDatabase] Starting Liquibase.
[updateDatabase] Successfully acquired change log lock
[updateDatabase] Successfully released change log lock

BUILD FAILED
D:\Liquibase\common-model\build.xml:90: Unable to update database.

以下是我的模型结构。

<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.1.xsd">

<changeSet id="12" author="bobs">
    <createTable tableName="department">
        <column name="id" type="int">
            <constraints primaryKey="true" nullable="false"/>
        </column>
        <column name="name" type="varchar(50)">
            <constraints nullable="false"/>
        </column>
        <column name="active" type="boolean" defaultValueBoolean="true"/>
    </createTable>
</changeSet>
</databaseChangeLog>

0 个答案:

没有答案
相关问题