Я пытаюсь создать свой первый журнал изменений в жидкой основе в весеннем приложении.Я выполняю ликвидабазу с maven, но она не работает.
<?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.1.xsd">
<changeSet id="1" author="tobias">
<createTable tableName="Entwickler">
<column name="id" type="int" autoIncrement="true">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="name" type="varchar(50)"/>
<column name="webseite" type="varchar(50)"/>
<column name="gruendungsdatum" type="BIGINT"/>
</createTable>
<createTable tableName="Publisher">
<column name="id" type="int" autoIncrement="true">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="name" type="varchar(50)"/>
<column name="webseite" type="varchar(50)"/>
<column name="gruendungsdatum" type="BIGINT"/>
</createTable>
<createTable tableName="Spiel">
<column name="id" type="int" autoIncrement="true">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="name" type="varchar(50)"/>
<column name="publisher_id" type="int">
<constraints nullable="false"
foreignKeyName="fk_publisher"
references="Publisher(id)"/>
</column>
</createTable>
<createTable tableName="Bilder">
<column name="id" type="int" autoIncrement="true">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="name" type="varchar(50)"/>
<column name="picture_kind" type="varchar(50)"/>
<column name="game_id" type="int">
<constraints nullable="false"
foreignKeyName="fk_game"
references="Spiel(id)"/>
</column>
</createTable>
<createTable tableName="Spiel_Entwickler">
<column name="id" type="int" autoIncrement="true">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="entwickler_id" type="int">
<constraints nullable="false"
foreignKeyName="fk_Entwickler"
references="Entwickler(id)"/>
</column>
<column name="game_id" type="int">
<constraints nullable="false"
foreignKeyName="fk_Game"
references="Spiel(id)"/>
</column>
</createTable>
<createTable tableName="Language">
<column name="id" type="int" autoIncrement="true">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="Language" type="varchar(50)"/>
</createTable>
<createTable tableName="plattform">
<column name="id" type="int" autoIncrement="true">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="plattform" type="varchar(50)"/>
</createTable>
<createTable tableName="Redaktion">
<column name="id" type="int" autoIncrement="true">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="Redaktion" type="varchar(50)"/>
</createTable>
<createTable tableName="Language_Spiel">
<column name="id" type="int" autoIncrement="true">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="name" type="varchar(50)"/>
<column name="spiel_id" type="int">
<constraints nullable="false"
foreignKeyName="fk_spiel"
references="Spiel(id)"/>
</column>
<column name="language_id" type="int">
<constraints nullable="false"
foreignKeyName="fk_language"
references="Language(id)"/>
</column>
<column name="Youtube" type="varchar(50)"/>
<column name="Beschreibung" type="varchar(50)"/>
<column name="Altersfreigabe" type="int"/>
</createTable>
<createTable tableName="spiel_plattform">
<column name="id" type="int" autoIncrement="true">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="name" type="varchar(50)"/>
<column name="spiel_id" type="int">
<constraints nullable="false"
foreignKeyName="fk_spiel"
references="Language_Spiel(id)"/>
</column>
<column name="plattform_id" type="int">
<constraints nullable="false"
foreignKeyName="fk_plattform"
references="plattform(id)"/>
</column>
<column name="releasedate" type="bigint"/>
<column name="releasedate_kind" type="varchar(50)"/>
<column name="shop" type="varchar(50)"/>
</createTable>
<createTable tableName="Rating">
<column name="id" type="int" autoIncrement="true">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="redaktion_id" type="int">
<constraints nullable="false"
foreignKeyName="fk_Rating"
references="Redaktion(id)"/>
</column>
<column name="plattform_id" type="int">
<constraints nullable="false"
foreignKeyName="fk_plattform"
references="spiel_plattform(id)"/>
</column>
<column name="rating" type="bigint"/>
</createTable>
<createTable tableName="Genre">
<column name="id" type="int" autoIncrement="true">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="genre" type="bigint"/>
</createTable>
<createTable tableName="Rating">
<column name="id" type="int" autoIncrement="true">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="game_id" type="int">
<constraints nullable="false"
foreignKeyName="fk_Game"
references="Language_Spiel(id)"/>
</column>
<column name="genre_id" type="int">
<constraints nullable="false"
foreignKeyName="fk_genre"
references="Genre(id)"/>
</column>
<column name="rating" type="bigint"/>
</createTable>
</changeSet>
</databaseChangeLog>
Я выполняю ликвидабазу с maven.mvn liquibase: update.
После выполнения я получаю сообщение об ошибке, что мне нужно иметь четное количество uris в заголовке для расположения схемы:
C:\Users\Tobi\IdeaProjects\games>mvn liquibase:update
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building games 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- liquibase-maven-plugin:3.4.2:update (default-cli) @ games ---
[INFO] ------------------------------------------------------------------------
[INFO] Parsing Liquibase Properties File
[INFO] File: liquibase/liquibase.properties
[INFO] ------------------------------------------------------------------------
[INFO] Executing on Database: jdbc:mysql://localhost:3306/games
INFO 19.05.18 14:44: liquibase: Successfully acquired change log lock
WARNING 19.05.18 14:44: liquibase: SchemaLocation: schemaLocation-Wert = 'http://www.liquibase.org/xml/ns/dbchangelog http://www
.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquiba
se.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog-ext ' muss eine gerade Anzahl an URIs
haben.
INFO 19.05.18 14:44: liquibase: Successfully released change log lock
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.568 s
[INFO] Finished at: 2018-05-19T14:44:16+02:00
[INFO] Final Memory: 13M/200M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.4.2:update (default-cli) on project games: Error setting u
p or running Liquibase: liquibase.exception.SetupException: Error parsing line 7 column 52 of liquibase/changelogs/Gameinterface
-changelog-1.xml: SchemaLocation: schemaLocation-Wert = 'http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xm
l/ns/dbchangelog/dbchangelog-3.0.xsd http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbc
hangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog-ext ' muss eine gerade Anzahl an URIs haben. -> [Help 1
]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Моя проблема - трассировка стека говорит, что яМне нужно четное количество Uris в расположении схемы в строке 7, позиция 52. Но моя строка заголовка находится не в строке 7, а в строке 4. Я выполнил liquibase в терминале intelliJ и в cmd.