Aggiunto campo su viaggio
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good

This commit is contained in:
2025-02-14 16:06:52 +01:00
parent be5412c5d9
commit 17a81d8f49
2 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20250214151715 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
executeStatement("ALTER TABLE gtb_mezzo ADD vettore_obbligatorio bit not null default 0",
"update gtb_mezzo set vettore_obbligatorio = 1 WHERE mezzo = 'VETTORE'");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -32,6 +32,10 @@ public class GtbMezzo extends EntityBase {
@SqlField(value = "cod_mezzo_intracee", maxLength = 5)
private String codMezzoIntracee;
@SqlField(value = "vettore_obbligatorio", defaultObjectValue = "false" )
private Boolean vettoreObbligatorio;
public GtbMezzo() {
super(logger);
}
@@ -59,4 +63,13 @@ public class GtbMezzo extends EntityBase {
public void setCodMezzoIntracee(String codMezzoIntracee) {
this.codMezzoIntracee = codMezzoIntracee;
}
public Boolean getVettoreObbligatorio() {
return vettoreObbligatorio;
}
public GtbMezzo setVettoreObbligatorio(Boolean vettoreObbligatorio) {
this.vettoreObbligatorio = vettoreObbligatorio;
return this;
}
}