@@ -0,0 +1,1074 @@
+package flyway.oskari;%0A%0Aimport fi.nls.oskari.log.LogFactory;%0Aimport fi.nls.oskari.log.Logger;%0Aimport fi.nls.oskari.util.PropertyUtil;%0Aimport org.flywaydb.core.api.migration.jdbc.JdbcMigration;%0A%0Aimport java.sql.Connection;%0Aimport java.sql.PreparedStatement;%0A%0Apublic class V1_54_2__remove_edit_layer_permissions  implements JdbcMigration %7B%0A    private static final Logger LOG = LogFactory.getLogger(V1_54_2__remove_edit_layer_permissions.class);%0A%0A    public void migrate(Connection conn) throws Exception %7B%0A        if(PropertyUtil.getOptional(%22flyway.1_54_2.skip%22, false)) %7B%0A            LOG.warn(%22You are skipping remove edit layer permissions migration.%22,%0A                    %22Note that Admin has always edit layer permission.%22,%0A                    %22Only reason to skip this is if you are using separate role for layer editing%22);%0A            return;%0A        %7D%0A        final String sql = %22DELETE FROM oskari_permission WHERE permission = 'EDIT_LAYER'%22;%0A        try(PreparedStatement statement = conn.prepareStatement(sql)) %7B%0A            statement.execute();%0A        %7D%0A    %7D%0A%7D%0A

add remove edit layer permissions flyway