cambiata la chiave sulla tabella azienda

This commit is contained in:
2025-12-04 13:02:19 +01:00
parent dd4ace59bd
commit 89c69bc0d2
2 changed files with 106 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_20251203165544 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
executeStatement("exec dbo.DropPrimaryKey 'azienda'\n",
"alter table azienda add id tinyint not null default 1;\n",
"alter table azienda add constraint pk_azienda primary key (id);\n",
"alter table azienda add constraint chk_id_azienda CHECK (id = 1)");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -34,6 +34,9 @@ public class Azienda extends EntityBase {
private static final long serialVersionUID = 1L;
@PK
@SqlField(value = "id", nullable = false)
private Short id;
@SqlField(value = "nome_ditta", maxLength = 40, nullable = false)
private String nomeDitta;
@@ -280,6 +283,21 @@ public class Azienda extends EntityBase {
@SqlField(value = "rappr_legale_prov_nascita", maxLength = 2)
private String rapprLegaleProvNascita;
@SqlField(value = "rappr_legale", maxLength = 255)
private String rapprLegale;
@SqlField(value = "flag_fatt_ele", maxLength = 1)
private String flagFattEle;
@SqlField(value = "cod_fda", maxLength = 20)
private String codFda;
@SqlField(value = "cod_fce")
private Integer codFce;
@SqlField(value = "cod_lucid", maxLength = 20)
private String codLucid;
@SqlField(value = "giorno_iniz_anno_fisc", nullable = false)
private Integer giornoInizAnnoFisc;
@@ -289,6 +307,9 @@ public class Azienda extends EntityBase {
@SqlField(value = "flag_regime_speciale_iva", maxLength = 1, nullable = false, defaultObjectValue = "N")
private String flagRegimeSpecialeIva;
@SqlField(value = "cod_cuc", maxLength = 10)
private String codCuc;
@JsonIgnore
@SqlField(value = "jwt_secret_key", maxLength = -1)
private String jwtSecretKey;
@@ -323,6 +344,15 @@ public class Azienda extends EntityBase {
this.applicationName = applicationName;
}
public Short getId() {
return id;
}
public Azienda setId(Short id) {
this.id = id;
return this;
}
public String getNomeDitta() {
return nomeDitta;
}
@@ -1029,6 +1059,51 @@ public class Azienda extends EntityBase {
return this;
}
public String getRapprLegale() {
return rapprLegale;
}
public Azienda setRapprLegale(String rapprLegale) {
this.rapprLegale = rapprLegale;
return this;
}
public String getFlagFattEle() {
return flagFattEle;
}
public Azienda setFlagFattEle(String flagFattEle) {
this.flagFattEle = flagFattEle;
return this;
}
public String getCodFda() {
return codFda;
}
public Azienda setCodFda(String codFda) {
this.codFda = codFda;
return this;
}
public Integer getCodFce() {
return codFce;
}
public Azienda setCodFce(Integer codFce) {
this.codFce = codFce;
return this;
}
public String getCodLucid() {
return codLucid;
}
public Azienda setCodLucid(String codLucid) {
this.codLucid = codLucid;
return this;
}
public Integer getGiornoInizAnnoFisc() {
return giornoInizAnnoFisc;
}
@@ -1064,4 +1139,13 @@ public class Azienda extends EntityBase {
this.jwtSecretKey = jwtSecretKey;
return this;
}
public String getCodCuc() {
return codCuc;
}
public Azienda setCodCuc(String codCuc) {
this.codCuc = codCuc;
return this;
}
}