inserito campo flag_attivo nella ctb_cont

This commit is contained in:
2025-12-01 09:47:54 +01:00
parent 3e0c443ce3
commit 6bb7b55618
2 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20251201090147 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
executeStatement("alter table ctb_cont add flag_attivo bit not null default 1");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -74,6 +74,9 @@ public class CtbCont extends EntityBase {
@SqlField(value = "data_mod", defaultObjectValue = CommonConstants.TIMESTAMP)
private Date dataMod;
@SqlField(value = "flag_attivo", nullable = false, defaultObjectValue = "1")
private Boolean flagAttivo;
public CtbCont() {
super(logger);
}
@@ -201,6 +204,15 @@ public class CtbCont extends EntityBase {
return this;
}
public Boolean getFlagAttivo() {
return flagAttivo;
}
public CtbCont setFlagAttivo(Boolean flagAttivo) {
this.flagAttivo = flagAttivo;
return this;
}
@Override
protected void deleteChilds() throws Exception {
String sql = Query.format(