From bcf80992172ac005646f299e1b7351e61267ab27 Mon Sep 17 00:00:00 2001 From: dylan Date: Wed, 22 Jan 2025 18:32:02 +0100 Subject: [PATCH] Change from Liquibase to Flyway because it's supported by GraalVM --- pom.xml | 6 ++++-- .../META-INF/native-image/reflect-config.json | 16 ++++++++++++++++ .../db/changelog/db.changelog-master.yaml | 4 ---- .../V1__init.sql} | 2 -- 4 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 src/main/resources/META-INF/native-image/reflect-config.json delete mode 100644 src/main/resources/db/changelog/db.changelog-master.yaml rename src/main/resources/db/{changelog/01-initial-schema.sql => migration/V1__init.sql} (63%) diff --git a/pom.xml b/pom.xml index 46bd3de..74b4e70 100644 --- a/pom.xml +++ b/pom.xml @@ -28,6 +28,7 @@ 23 + 11.2.0 @@ -39,8 +40,9 @@ spring-boot-starter-web - org.liquibase - liquibase-core + org.flywaydb + flyway-database-postgresql + ${flyway.version} org.postgresql diff --git a/src/main/resources/META-INF/native-image/reflect-config.json b/src/main/resources/META-INF/native-image/reflect-config.json new file mode 100644 index 0000000..0826f62 --- /dev/null +++ b/src/main/resources/META-INF/native-image/reflect-config.json @@ -0,0 +1,16 @@ +[ + { + "name": "org.flywaydb.core.internal.publishing.PublishingConfigurationExtension", + "methods": [ + { + "name": "isCheckDriftOnMigrate" + }, + { + "name": "setCheckDriftOnMigrate", + "parameterTypes": [ + "boolean" + ] + } + ] + } +] diff --git a/src/main/resources/db/changelog/db.changelog-master.yaml b/src/main/resources/db/changelog/db.changelog-master.yaml deleted file mode 100644 index 36a1cab..0000000 --- a/src/main/resources/db/changelog/db.changelog-master.yaml +++ /dev/null @@ -1,4 +0,0 @@ -databaseChangeLog: - - include: - file: 01-initial-schema.sql - relativeToChangelogFile: true diff --git a/src/main/resources/db/changelog/01-initial-schema.sql b/src/main/resources/db/migration/V1__init.sql similarity index 63% rename from src/main/resources/db/changelog/01-initial-schema.sql rename to src/main/resources/db/migration/V1__init.sql index 360430b..3d1ec12 100644 --- a/src/main/resources/db/changelog/01-initial-schema.sql +++ b/src/main/resources/db/migration/V1__init.sql @@ -1,5 +1,3 @@ --- Liquibase formatted SQL --- changeset dmigewant:1 CREATE TABLE example_table ( id SERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL