Maven更新没有任何作用

时间:2019-02-04 17:49:22

标签: maven spring-boot pom.xml liquibase

我有一个jhipster liquibase项目,并且已经用命令mvn liquibase:diff

生成了一个变更日志。

但是当我运行mvn liquibase:update时,什么也没发生。难道我做错了什么 ?

20190204170036_changelog.xml:

<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
    <changeSet author="User (generated)" id="1549299649735-1">
        <addColumn tableName="booking">
            <column name="price" type="double precision"/>
        </addColumn>
    </changeSet>
    <changeSet author="User (generated)" id="1549299649735-2">
        <addColumn tableName="booking">
            <column name="promotional_code_id" type="bigint"/>
        </addColumn>
    </changeSet>
    <changeSet author="User (generated)" id="1549299649735-3">
        <addForeignKeyConstraint baseColumnNames="promotional_code_id" baseTableName="booking" constraintName="FKoyhf3fa96qsyu1wg2yphl17yu" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="promotional_code"/>
    </changeSet>
</databaseChangeLog>

这是我pom.xml中的liquibase配置:

<plugin>
    <groupId>org.liquibase</groupId>
    <artifactId>liquibase-maven-plugin</artifactId>
    <version>${liquibase.version}</version>
    <configuration>
        <changeLogFile>src/main/resources/config/liquibase/master.xml</changeLogFile>
        <diffChangeLogFile>src/main/resources/config/liquibase/changelog/${maven.build.timestamp}_changelog.xml</diffChangeLogFile>
        <driver>com.mysql.jdbc.Driver</driver>
        <url>jdbc:mysql://urlofmydatabase:3306/perfectcar</url>
        <defaultSchemaName>perfectcar</defaultSchemaName>
        <username>myusername</username>
        <password>mypassword</password>
        <referenceUrl>hibernate:spring:com.perfectcar.perfectcar.domain?dialect=org.hibernate.dialect.MySQL5InnoDBDialect&amp;hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&amp;hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy</referenceUrl>
        <verbose>true</verbose>
        <logging>info</logging>
        <contexts>prod</contexts>
    </configuration>
    <dependencies>
        [...]
    </dependencies>
</plugin>

0 个答案:

没有答案