From 0af0883d145d03bb805185a90052198913d8142e Mon Sep 17 00:00:00 2001 From: Emilia Jaser Date: Sun, 8 Dec 2024 12:15:07 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20(org):=20Ma?= =?UTF-8?q?ke=20test=20data=20available=20in=20DEV=20and=20TEST=20modes,?= =?UTF-8?q?=20automatically?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app.hopps.org/src/main/resources/application.properties | 2 ++ .../{import.sql => db/testdata/V2.0.0__test_data.sql} | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) rename backend/app.hopps.org/src/main/resources/{import.sql => db/testdata/V2.0.0__test_data.sql} (99%) diff --git a/backend/app.hopps.org/src/main/resources/application.properties b/backend/app.hopps.org/src/main/resources/application.properties index 62da967c..3218ae8e 100644 --- a/backend/app.hopps.org/src/main/resources/application.properties +++ b/backend/app.hopps.org/src/main/resources/application.properties @@ -6,6 +6,8 @@ quarkus.banner.path=banner.txt quarkus.flyway.migrate-at-start=true quarkus.flyway.baseline-on-migrate=true quarkus.flyway.clean-at-start=false +%test.quarkus.flyway.locations=db/migration,db/testdata +%dev.quarkus.flyway.locations=db/migration,db/testdata ######################################## # Keycloak/auth ######################################## diff --git a/backend/app.hopps.org/src/main/resources/import.sql b/backend/app.hopps.org/src/main/resources/db/testdata/V2.0.0__test_data.sql similarity index 99% rename from backend/app.hopps.org/src/main/resources/import.sql rename to backend/app.hopps.org/src/main/resources/db/testdata/V2.0.0__test_data.sql index d34bc898..2e9e4826 100644 --- a/backend/app.hopps.org/src/main/resources/import.sql +++ b/backend/app.hopps.org/src/main/resources/db/testdata/V2.0.0__test_data.sql @@ -1,5 +1,3 @@ -START TRANSACTION; - insert into Organization (type, id, slug, name, website, plz, city, street, number) values (0, 2, 'gruenes-herz-ev', 'GrĂ¼nes Herz e.V.', 'https://gruenes-herz.de/', '27324', 'Schweringen', 'Am Lennestein', '110'), @@ -104,5 +102,3 @@ where id = 3; update Organization set rootBommel_id = 23 where id = 4; - -COMMIT;