Skip to content

Commit

Permalink
Merge pull request #58 from DenverCoder544/add_find_by_coodinates_bundle
Browse files Browse the repository at this point in the history
add find by coordinates bundle to DEFAULT views
  • Loading branch information
ZakarFin authored Feb 23, 2024
2 parents 7740434 + cb03440 commit 666b7f0
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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<Long> appsetupIds = AppSetupHelper.getSetupsForType(connection,"DEFAULT");
AppSetupHelper.addOrUpdateBundleInApps(connection, findByCoordinatesBundle, appsetupIds);
}
}

0 comments on commit 666b7f0

Please sign in to comment.