From cb03440b4dd70ac277a185c95247c9be371d2350 Mon Sep 17 00:00:00 2001 From: Pekka Helesuo Date: Thu, 22 Feb 2024 16:02:02 +0200 Subject: [PATCH] add find by coordinates bundle to DEFAULT views --- .../V1_1_4__add_findbycoordinates_bundle.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 app-resources/src/main/java/flyway/example/V1_1_4__add_findbycoordinates_bundle.java diff --git a/app-resources/src/main/java/flyway/example/V1_1_4__add_findbycoordinates_bundle.java b/app-resources/src/main/java/flyway/example/V1_1_4__add_findbycoordinates_bundle.java new file mode 100644 index 0000000..f7f5f5a --- /dev/null +++ b/app-resources/src/main/java/flyway/example/V1_1_4__add_findbycoordinates_bundle.java @@ -0,0 +1,19 @@ +package flyway.example; + +import fi.nls.oskari.domain.map.view.Bundle; +import org.flywaydb.core.api.migration.BaseJavaMigration; +import org.flywaydb.core.api.migration.Context; +import org.oskari.helpers.AppSetupHelper; + +import java.sql.Connection; +import java.util.List; + +public class V1_1_4__add_findbycoordinates_bundle extends BaseJavaMigration { + @Override + public void migrate(Context context) throws Exception { + Bundle findByCoordinatesBundle = new Bundle("findbycoordinates"); + Connection connection = context.getConnection(); + List appsetupIds = AppSetupHelper.getSetupsForType(connection,"DEFAULT"); + AppSetupHelper.addOrUpdateBundleInApps(connection, findByCoordinatesBundle, appsetupIds); + } +}