@@ -0,0 +1,1356 @@
+package flyway.asdi;%0A%0Aimport fi.nls.oskari.db.BundleHelper;%0Aimport fi.nls.oskari.domain.map.view.Bundle;%0Aimport fi.nls.oskari.domain.map.view.View;%0Aimport fi.nls.oskari.map.view.ViewService;%0Aimport fi.nls.oskari.map.view.ViewServiceIbatisImpl;%0Aimport fi.nls.oskari.util.FlywayHelper;%0Aimport org.flywaydb.core.api.migration.jdbc.JdbcMigration;%0Aimport org.json.JSONObject;%0A%0Aimport java.sql.Connection;%0Aimport java.util.List;%0A%0A/**%0A * Created by MMLDEV on 16.1.2018.%0A */%0Apublic class V1_14_1__add_projection_change_ui implements JdbcMigration %7B%0A%0A    private static final String BUNDLE_ID = %22asdi-projection-change%22;%0A%0A    public void migrate(Connection connection) throws Exception %7B%0A        // register%0A        Bundle bundle = new Bundle();%0A        bundle.setConfig(%22%7B%7D%22);%0A        bundle.setState(%22%7B%7D%22);%0A        bundle.setName(BUNDLE_ID);%0A        bundle.setStartup(BundleHelper.getDefaultBundleStartup(%22asdi%22, BUNDLE_ID, %22Projection change UI%22));%0A        BundleHelper.registerBundle(bundle);%0A%0A        // add to appsetups%0A        final List%3CLong%3E views = FlywayHelper.getUserAndDefaultViewIds(connection);%0A        for (Long viewId : views) %7B%0A            if (FlywayHelper.viewContainsBundle(connection, BUNDLE_ID, viewId)) %7B%0A                continue;%0A            %7D%0A            FlywayHelper.addBundleWithDefaults(connection, viewId, BUNDLE_ID);%0A        %7D%0A    %7D%0A%7D%0A

Add UI for users to change projection