Skip to content

Commit

Permalink
add layeranalytics bundle to all views
Browse files Browse the repository at this point in the history
  • Loading branch information
DenverCoder544 committed Feb 20, 2024
1 parent 9ab813b commit dbd5233
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 dbd5233

Please sign in to comment.