@@ -0,0 +1,1051 @@
+package flyway.asdi;%0A%0Aimport fi.nls.oskari.domain.map.view.View;%0Aimport fi.nls.oskari.map.view.ViewService;%0Aimport fi.nls.oskari.map.view.ViewServiceIbatisImpl;%0Aimport org.flywaydb.core.api.migration.jdbc.JdbcMigration;%0Aimport org.json.JSONObject;%0A%0Aimport java.sql.Connection;%0A%0A/**%0A * Created by MMLDEV on 16.1.2018.%0A */%0Apublic class V1_14_0__projection_appsetups implements JdbcMigration %7B%0A%0A    // EPSG:3571-3576 (North Pole LAEAs) 3575 already exists%0A    private static final String%5B%5D PROJECTIONS_TO_ADD = new String%5B%5D %7B%22EPSG:3571%22, %22EPSG:3572%22, %22EPSG:3573%22, %22EPSG:3574%22, %22EPSG:3576%22%7D;%0A%0A    public void migrate(Connection connection)%0A            throws Exception %7B%0A        ViewService service = new ViewServiceIbatisImpl();%0A        View defaultView = service.getViewWithConf(service.getDefaultViewId());%0A        for(String srs : PROJECTIONS_TO_ADD) %7B%0A            View view = defaultView.cloneBasicInfo();%0A            JSONObject opts = view.getMapOptions();%0A            opts.put(%22srsName%22, srs);%0A            service.addView(view);%0A        %7D%0A    %7D%0A%0A%7D%0A

Add appsetups for new projections