Skip to content

Commit

Permalink
Merge pull request #28 from DenverCoder544/add_layeranalytics_bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakarFin committed Feb 20, 2024
2 parents 9ab813b + dbd5233 commit 975de07
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package flyway.asdi2;

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_27_1__add_layeranalytics_bundle extends BaseJavaMigration {
@Override
public void migrate(Context context) throws Exception {
Connection connection = context.getConnection();
String bundleName = "layeranalytics";
Bundle layerAnalyticsBundle = new Bundle(bundleName);
List<Long> appsetupIds = AppSetupHelper.getSetupsForType(connection, null);
AppSetupHelper.addOrUpdateBundleInApps(connection, layerAnalyticsBundle, appsetupIds);
}
}

0 comments on commit 975de07

Please sign in to comment.