impostato ad N il campo flag_jflav_default se null e reso not null, inserita relazione nella stbUser con JrlFlavUsers
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20250624104559 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
executeStatement("update jrl_flav_users set flag_jflav_default = 'N' where flag_jflav_default is null",
|
||||
"alter table jrl_flav_users alter column flag_jflav_default varchar(1) not null");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,7 @@ public class JrlFlavUsers extends EntityBase {
|
||||
@SqlField(value = "user_name", maxLength = 40, nullable = false)
|
||||
private String userName;
|
||||
|
||||
@SqlField(value = "flag_jflav_default", maxLength = 1)
|
||||
@SqlField(value = "flag_jflav_default", maxLength = 1, nullable = false)
|
||||
private String flagJflavDefault;
|
||||
|
||||
public JrlFlavUsers() {
|
||||
|
||||
@@ -173,6 +173,9 @@ public class StbUser extends EntityBase {
|
||||
@EntityChild
|
||||
private List<SrlUserAttached> srlUserAttached = new ArrayList<>();
|
||||
|
||||
@EntityChild
|
||||
private List<JrlFlavUsers> jrlFlavUsers = new ArrayList<>();
|
||||
|
||||
@Priority(101)
|
||||
private SrlActivityTypeUser srlActivityTypeUser;
|
||||
|
||||
@@ -629,6 +632,15 @@ public class StbUser extends EntityBase {
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<JrlFlavUsers> getJrlFlavUsers() {
|
||||
return jrlFlavUsers;
|
||||
}
|
||||
|
||||
public StbUser setJrlFlavUsers(List<JrlFlavUsers> jrlFlavUsers) {
|
||||
this.jrlFlavUsers = jrlFlavUsers;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void insertChilds() throws Exception {
|
||||
if (getStbAbil() != null) {
|
||||
@@ -687,6 +699,9 @@ public class StbUser extends EntityBase {
|
||||
for (SrlUserAttached srlUserAttached : getSrlUserAttached()) {
|
||||
srlUserAttached.manageWithParentConnection(connection, srlUserAttached.getOperation(), dataCompleting, entityHolder);
|
||||
}
|
||||
for (JrlFlavUsers jrlFlavUsers : getJrlFlavUsers()) {
|
||||
jrlFlavUsers.manageWithParentConnection(connection, jrlFlavUsers.getOperation(), dataCompleting, entityHolder);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -732,5 +747,7 @@ public class StbUser extends EntityBase {
|
||||
wrlUsersFasi.deleteAllEntities(connection, this);
|
||||
WtbUsersInfo wtbUsersInfo = new WtbUsersInfo();
|
||||
wtbUsersInfo.deleteAllEntities(connection, this);
|
||||
JrlFlavUsers jrlFlavUsers = new JrlFlavUsers();
|
||||
jrlFlavUsers.deleteAllEntities(connection, this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user