Split into multiple changelogs
This commit is contained in:
@@ -25,7 +25,8 @@ public class DatabaseMigrations {
|
|||||||
private static void runLiquibaseUpdate() {
|
private static void runLiquibaseUpdate() {
|
||||||
try (Connection connection = DatabaseConnection.getConnection()) {
|
try (Connection connection = DatabaseConnection.getConnection()) {
|
||||||
liquibase.database.DatabaseConnection databaseConnection = new JdbcConnection(connection);
|
liquibase.database.DatabaseConnection databaseConnection = new JdbcConnection(connection);
|
||||||
Liquibase liquibase = new Liquibase("db/changelog.xml", new ClassLoaderResourceAccessor(), databaseConnection);
|
Liquibase liquibase = new Liquibase("db/changelog-root.xml", new ClassLoaderResourceAccessor(),
|
||||||
|
databaseConnection);
|
||||||
liquibase.setShowSummaryOutput(UpdateSummaryOutputEnum.LOG);
|
liquibase.setShowSummaryOutput(UpdateSummaryOutputEnum.LOG);
|
||||||
liquibase.update();
|
liquibase.update();
|
||||||
} catch (SQLException | LiquibaseException e) {
|
} catch (SQLException | LiquibaseException e) {
|
||||||
|
|||||||
54
src/main/resources/db/changelog-data.xml
Normal file
54
src/main/resources/db/changelog-data.xml
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<?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-latest.xsd">
|
||||||
|
|
||||||
|
<changeSet id="101" author="Ponk">
|
||||||
|
<sqlFile path="db/data/101-shops-data.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
<changeSet id="102" author="Ponk">
|
||||||
|
<sqlFile path="db/data/102-shopitems-data.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="111" author="Ponk">
|
||||||
|
<sqlFile path="db/data/111-makercreate-data.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
<changeSet id="112" author="Ponk">
|
||||||
|
<sqlFile path="db/data/112-makerrecipe-data.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
<changeSet id="113" author="Ponk">
|
||||||
|
<sqlFile path="db/data/113-makerreward-data.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
<changeSet id="114" author="Ponk">
|
||||||
|
<sqlFile path="db/data/114-makerreagent-data.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="121" author="Ponk">
|
||||||
|
<sqlFile path="db/data/121-monstercard-data.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="131" author="Ponk">
|
||||||
|
<sqlFile path="db/data/131-reactordrops-data.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="141" author="Ponk">
|
||||||
|
<sqlFile path="db/data/141-specialcashitems-data.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
<changeSet id="142" author="Ponk">
|
||||||
|
<sqlFile path="db/data/142-nxcoupons-data.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="151" author="Ponk">
|
||||||
|
<sqlFile path="db/data/151-global-drop-data.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
<changeSet id="152" author="Ponk">
|
||||||
|
<sqlFile path="db/data/152-drop-data.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="161" author="Ponk">
|
||||||
|
<sqlFile path="db/data/161-admin-data.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
</databaseChangeLog>
|
||||||
11
src/main/resources/db/changelog-root.xml
Normal file
11
src/main/resources/db/changelog-root.xml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?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-latest.xsd">
|
||||||
|
|
||||||
|
<include file="/db/changelog-tables.xml"/>
|
||||||
|
<include file="/db/changelog-data.xml"/>
|
||||||
|
|
||||||
|
</databaseChangeLog>
|
||||||
108
src/main/resources/db/changelog-tables.xml
Normal file
108
src/main/resources/db/changelog-tables.xml
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
<?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-latest.xsd">
|
||||||
|
|
||||||
|
<changeSet id="1" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/001-account.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="2" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/002-character.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="3" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/003-inventory.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="4" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/004-skill.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="5" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/005-pet.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="6" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/006-quest.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="7" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/007-guild.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="8" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/008-keymap.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="9" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/009-drop.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="10" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/010-storage.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="11" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/011-shop.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="12" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/012-character-state.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="13" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/013-cashshop.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="14" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/014-gift.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="15" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/015-marriage.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="16" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/016-monsterbook.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="17" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/017-family.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="18" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/018-transfer.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="19" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/019-mts.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="20" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/020-maker.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="21" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/021-field-object.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="22" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/022-ban.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="23" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/023-bosslog.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="24" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/024-duey.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="25" author="Ponk">
|
||||||
|
<sqlFile path="db/tables/025-test.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -1,150 +0,0 @@
|
|||||||
<?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-latest.xsd">
|
|
||||||
|
|
||||||
<changeSet id="1" author="Ponk">
|
|
||||||
<sqlFile path="db/001-account.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="2" author="Ponk">
|
|
||||||
<sqlFile path="db/002-character.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="3" author="Ponk">
|
|
||||||
<sqlFile path="db/003-inventory.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="4" author="Ponk">
|
|
||||||
<sqlFile path="db/004-skill.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="5" author="Ponk">
|
|
||||||
<sqlFile path="db/005-pet.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="6" author="Ponk">
|
|
||||||
<sqlFile path="db/006-quest.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="7" author="Ponk">
|
|
||||||
<sqlFile path="db/007-guild.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="8" author="Ponk">
|
|
||||||
<sqlFile path="db/008-keymap.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="9" author="Ponk">
|
|
||||||
<sqlFile path="db/009-drop.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="10" author="Ponk">
|
|
||||||
<sqlFile path="db/010-storage.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="11" author="Ponk">
|
|
||||||
<sqlFile path="db/011-shop.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="12" author="Ponk">
|
|
||||||
<sqlFile path="db/012-character-state.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="13" author="Ponk">
|
|
||||||
<sqlFile path="db/013-cashshop.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="14" author="Ponk">
|
|
||||||
<sqlFile path="db/014-gift.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="15" author="Ponk">
|
|
||||||
<sqlFile path="db/015-marriage.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="16" author="Ponk">
|
|
||||||
<sqlFile path="db/016-monsterbook.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="17" author="Ponk">
|
|
||||||
<sqlFile path="db/017-family.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="18" author="Ponk">
|
|
||||||
<sqlFile path="db/018-transfer.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="19" author="Ponk">
|
|
||||||
<sqlFile path="db/019-mts.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="20" author="Ponk">
|
|
||||||
<sqlFile path="db/020-maker.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="21" author="Ponk">
|
|
||||||
<sqlFile path="db/021-field-object.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="22" author="Ponk">
|
|
||||||
<sqlFile path="db/022-ban.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="23" author="Ponk">
|
|
||||||
<sqlFile path="db/023-bosslog.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="24" author="Ponk">
|
|
||||||
<sqlFile path="db/024-duey.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="101" author="Ponk">
|
|
||||||
<sqlFile path="db/101-shops-data.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
<changeSet id="102" author="Ponk">
|
|
||||||
<sqlFile path="db/102-shopitems-data.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="111" author="Ponk">
|
|
||||||
<sqlFile path="db/111-makercreate-data.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
<changeSet id="112" author="Ponk">
|
|
||||||
<sqlFile path="db/112-makerrecipe-data.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
<changeSet id="113" author="Ponk">
|
|
||||||
<sqlFile path="db/113-makerreward-data.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
<changeSet id="114" author="Ponk">
|
|
||||||
<sqlFile path="db/114-makerreagent-data.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="121" author="Ponk">
|
|
||||||
<sqlFile path="db/121-monstercard-data.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="131" author="Ponk">
|
|
||||||
<sqlFile path="db/131-reactordrops-data.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="141" author="Ponk">
|
|
||||||
<sqlFile path="db/141-specialcashitems-data.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
<changeSet id="142" author="Ponk">
|
|
||||||
<sqlFile path="db/142-nxcoupons-data.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="151" author="Ponk">
|
|
||||||
<sqlFile path="db/151-global-drop-data.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
<changeSet id="152" author="Ponk">
|
|
||||||
<sqlFile path="db/152-drop-data.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
<changeSet id="901" author="Ponk">
|
|
||||||
<sqlFile path="db/901-admin-data.sql"/>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
</databaseChangeLog>
|
|
||||||
4
src/main/resources/db/tables/025-test.sql
Normal file
4
src/main/resources/db/tables/025-test.sql
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
CREATE TABLE test
|
||||||
|
(
|
||||||
|
id INT PRIMARY KEY
|
||||||
|
);
|
||||||
Reference in New Issue
Block a user