- aggiunto campo note in ctbAmac
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
- corretta migration report sui nullpointer
This commit is contained in:
@@ -4,6 +4,7 @@ import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
import it.integry.ems_model.entity.WtbJrept;
|
||||
import it.integry.ems_model.types.OperationType;
|
||||
import it.integry.ems_model.utility.UtilityList;
|
||||
import net.sf.jasperreports.engine.JasperCompileManager;
|
||||
import net.sf.jasperreports.engine.JasperReport;
|
||||
import net.sf.jasperreports.engine.util.JRSaver;
|
||||
@@ -24,11 +25,16 @@ public class Migration_20241108153628 extends BaseMigration implements Migration
|
||||
|
||||
String sql = "SELECT * FROM wtb_jrept";
|
||||
final List<WtbJrept> wtbJrepts = executeQueryDTO(sql, WtbJrept.class);
|
||||
if (UtilityList.isNullOrEmpty(wtbJrepts))
|
||||
return;
|
||||
|
||||
for (WtbJrept w : wtbJrepts) {
|
||||
byte[] jrxml = Base64.decodeBase64(w.getB64Jrxml());
|
||||
byte[] jrxml = Base64.decodeBase64(w.getB64Jrxml());
|
||||
if (jrxml == null)
|
||||
continue;
|
||||
|
||||
ByteArrayInputStream bais = new ByteArrayInputStream(jrxml);
|
||||
|
||||
final JasperReport compiledReport = JasperCompileManager.compileReport(bais);
|
||||
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20241111125804 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
|
||||
executeStatement("ALTER TABLE ctb_amac ADD note varchar(MAX)");
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user