allineamento dait
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,40 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.IntegryCustomer;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20251027170624 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
if (!isCustomer(IntegryCustomer.Integry)) return;
|
||||
|
||||
executeStatement("UPDATE jtb_rlavr set da_ora = stb_activity.effective_time,\n" +
|
||||
" a_ora = stb_activity.effective_endtime\n" +
|
||||
" from jtb_rlavr inner join stb_activity on jtb_rlavr.activity_id = stb_activity.activity_id\n" +
|
||||
" inner join jvw_flav_nominativo on jtb_rlavr.cod_jflav = jvw_flav_nominativo.cod_jflav\n" +
|
||||
" where data_lav >= '2025/01/01'\n" +
|
||||
" and ore > 0\n" +
|
||||
" and da_ora is null",
|
||||
"update jtb_rlavr\n" +
|
||||
" set a_ora = DateAdd(MINUTE, (ore * 0.6) * 100, da_ora)\n" +
|
||||
" from jtb_rlavr\n" +
|
||||
" where data_lav >= '2025/01/01'\n" +
|
||||
" and ore > 0\n" +
|
||||
" and da_ora = a_ora",
|
||||
" update stb_activity\n" +
|
||||
" set effective_endtime = DateAdd(MINUTE, (ore * 0.6) * 100, effective_time)\n" +
|
||||
" from jtb_rlavr inner join stb_activity on stb_activity.activity_id = jtb_rlavr.activity_id\n" +
|
||||
" where data_lav >= '2025/01/01'\n" +
|
||||
" and ore > 0\n" +
|
||||
" and effective_endtime = effective_time");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user