0
我不得不從liqibase更新開始我的Java應用程序liquibase-插件錯誤 - 遷移失敗
錯誤問題:
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.5.1:update (default-cli) on project api-manager: Error setting up or running Liquibase: Migration failed for change set db/changelog/1.0/1.0-init-tables.xml::1.0-init-tables::api-manager:
[ERROR] Reason: liquibase.exception.DatabaseException: ERROR: relation "service" does not exist [Failed SQL ..... so on ... so on
POM片段
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<scope>runtime</scope>
</dependency>
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>${liquibase-maven-plugin.version}</version>
<configuration>
<changeLogFile>db/changelog/db.changelog-master.xml</changeLogFile>
<driver>${manager.db.driver}</driver>
<url>${manager.db.url}</url>
<username>${manager.db.user}</username>
<password>${manager.db.password}</password>
<verbose>false</verbose>
<logging>info</logging>
<contexts>${manager.db.contexts}</contexts>
<promptOnNonLocalDatabase>false</promptOnNonLocalDatabase>
</configuration>
</plugin>
db.changelog主。 xml在resources/db/changelog/db.changelog-master.xml中:
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<include file="db/changelog/1.0/1.0-init-tables.xml"/>
</databaseChangeLog>
1.0的init-tables.xml資源/ DB /變化/ 1.0/1.0-INIT-tables.xml:
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<changeSet id="1.0-init-tables" author="api-manager">
HERE ARE MINE <CREATE TABLES>
</changeSet>
</databaseChangeLog>
如果SQL錯誤日誌,需要讓我知道,然後我將編輯這個帖子。