From a1a753e00a3553531387a19551ec06a34d435771 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Tue, 4 Feb 2025 09:55:48 +0100 Subject: [PATCH] replace office-data-import by db-restore (#154) Co-authored-by: Michael Hoennig Reviewed-on: https://dev.hostsharing.net/hostsharing/hs.hsadmin.ng/pulls/154 Reviewed-by: Marc Sandlus --- .run/ImportHostingAssets.run.xml | 1 + .run/ImportOfficeData.run.xml | 2 +- .../0-base/009-check-environment.sql | 2 +- .../630-booking-item/6300-hs-booking-item.sql | 2 +- .../db/changelog/9-hs-global/9800-cleanup.sql | 38 + .../db/changelog/db.changelog-master.yaml | 4 + .../hs/migration/BaseOfficeDataImport.java | 94 +- .../hsadminng/hs/migration/CsvDataImport.java | 71 +- .../hs/migration/ImportHostingAssets.java | 232 +- .../hs/migration/ImportOfficeData.java | 15 +- ...LiquibaseCompatibilityIntegrationTest.java | 140 +- .../hs/migration/LiquibaseConfig.java | 17 +- .../hs/migration/LiquibaseMigration.java | 55 + .../hs/migration/PostgresTestcontainer.java | 81 + ...ly-office-schema-with-import-test-data.sql | 20338 ++++++++++++++++ ...sed-only-office-schema-with-test-data.sql} | 0 16 files changed, 20752 insertions(+), 340 deletions(-) create mode 100644 src/main/resources/db/changelog/9-hs-global/9800-cleanup.sql create mode 100644 src/test/java/net/hostsharing/hsadminng/hs/migration/LiquibaseMigration.java create mode 100644 src/test/java/net/hostsharing/hsadminng/hs/migration/PostgresTestcontainer.java create mode 100644 src/test/resources/db/released-only-office-schema-with-import-test-data.sql rename src/test/resources/db/{prod-only-office-schema-with-test-data.sql => released-only-office-schema-with-test-data.sql} (100%) diff --git a/.run/ImportHostingAssets.run.xml b/.run/ImportHostingAssets.run.xml index bedd7143..9ac4f496 100644 --- a/.run/ImportHostingAssets.run.xml +++ b/.run/ImportHostingAssets.run.xml @@ -6,6 +6,7 @@ +