aggiunte descrizioni tabelle
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good

This commit is contained in:
2025-10-10 09:06:34 +02:00
parent c6380a9e05
commit 02eb94fdef
5 changed files with 192 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ import it.integry.ems_model.exception.DataConverterNotFoundException;
import it.integry.ems_model.rulescompleting.DroolsDataCompleting;
import it.integry.ems_model.types.ApplicationName;
import it.integry.ems_model.types.OperationType;
import it.integry.ems_model.types.TypeDbObject;
import it.integry.ems_model.utility.Query;
import it.integry.ems_model.utility.UtilityDB;
import it.integry.ems_model.utility.UtilityString;
@@ -594,4 +595,38 @@ public abstract class BaseMigration implements MigrationModelInterface {
protected boolean isSqlServer2022() throws Exception {
return getSqlCompatibilityLevel() == DatabaseVersionEnum.SQLServer2022;
}
protected void addDescriptionTable(String tableName, String description) throws SQLException {
if (existsTable(tableName)) {
addDescriptionObject(tableName, TypeDbObject.TABLE, description);
}
}
protected void addDescriptionView(String viewName, String description) throws SQLException {
if (existsView(viewName)) {
addDescriptionObject(viewName, TypeDbObject.VIEW, description);
}
}
private void addDescriptionObject(String objectName, TypeDbObject type, String description) throws SQLException {
String typeString = "TABLE";
if (type == TypeDbObject.VIEW) {
typeString = "VIEW";
}
executeStatement(
Query.format("EXEC sp_addextendedproperty " +
"@name = N'MS_Description', " +
"@value = %s, " +
"@level0type = N'SCHEMA', @level0name = 'dbo', " +
"@level1type = %s, @level1name = %s;", description, typeString, objectName));
}
private void addDescriptionColumn(String tableName, String columnName, String description) throws SQLException {
executeStatement(Query.format("EXEC sp_addextendedproperty 'MS_Description', %s, 'SCHEMA', 'dbo', 'TABLE',%s, 'COLUMN', %s)",
description, tableName, columnName));
}
}

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.IntegryCustomer;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20251008144628 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
if (isCustomer(IntegryCustomer.Carelli)) {
updateSetupValue("DATI_AZIENDA", "SETUP", "INVIO_EMAIL_NEW", "S");
}
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,28 @@
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_20251008155302 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
createSetupQuery("SI_NO", "SI_NO", "SELECT 'S' UNION ALL SELECT 'N'");
createSetup("W_SUPTABLE", "SETUP", "ATTIVA_MODIFICA", "S",
"attiva la linguetta che permette di inseire le query", true, "SI_NO", true, false,
true, false, false, null, false, "SELECT 'S' UNION ALL SELECT 'N'");
if (isCustomer(IntegryCustomer.Carelli)){
updateSetupValue("W_SUPTABLE", "SETUP", "ATTIVA_MODIFICA", "N");
}
}
@Override
public void down() throws Exception {
}
}

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_20251009104325 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
addDescriptionTable("mtb_aart", "Tabella che contiene le anagrafiche degli articoli");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,88 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20251009112050 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
addDescriptionTable("atb_list_data", "Tabella che contiene Listini di acquisto in data");
addDescriptionTable("atb_list_imp", "Tabella che contiene importazione listini di acquisto");
addDescriptionTable("dtb_doc_log_import", "Tabella che contiene log importazione documenti");
addDescriptionTable("dtb_ord_log_import", "Tabella che contiene log importazione ordini");
addDescriptionTable("dtb_ord_steps", "Tabella che contiene quantitativo prodotto allocato per settore/ordine");
addDescriptionTable("gtb_divi_cambi", "Tabella che contiene Storico Cambi");
addDescriptionTable("gtb_mod_iva", "Tabella che contiene modelli iva");
addDescriptionTable("jrl_flav_users", "Tabella che contiene relazione tra lavoratori e utenti");
addDescriptionTable("jtb_disegni_files", "Tabella che contiene contenuto files");
addDescriptionTable("jtb_rfid_ord", "Tabella che contiene RFID Associato ad ordine");
addDescriptionTable("mtb_aart_marchio", "Tabella che contiene marchio prodotto");
addDescriptionTable("mtb_col_log_import", "Tabella che contiene colli generari durante l'importazione degli ordini");
addDescriptionTable("mtb_ecr_categ", "Tabella che contiene Categorie");
addDescriptionTable("mtb_ecr_mcateg", "Tabella che contiene Macrocategoria");
addDescriptionTable("mtb_ecr_reparti", "Tabella che contiene Reparti");
addDescriptionTable("mtb_ecr_stipo", "Tabella che contiene Sottotipo");
addDescriptionTable("mtb_ecr_tipo", "Tabella che contiene Tipo");
addDescriptionTable("mtb_grup_costi", "Tabella che contiene costi per reparto");
addDescriptionTable("mtb_grup_sgrp_ass", "Tabella che contiene associazione gruppi_sottogruppi-articoli");
addDescriptionTable("mtb_lisa_data", "Tabella che contiene listini di acquisto in data");
addDescriptionTable("mtb_sfam", "Tabella che contiene Sottofamiglia");
addDescriptionTable("ntb_tipi_inca", "Tabella che contiene tipi incasso");
addDescriptionTable("serv_vamacc_load_activity", "Tabella che contiene di servizio contenente le attività relative ad un macchinario per area");
addDescriptionTable("srl_activity_users", "Tabella che contiene relazione attività con utenti associati");
addDescriptionTable("srl_user_activity_reports", "Tabella che contiene relazioni tra utenti e report che l'utente può visualizzare sulle attività");
addDescriptionTable("stb_activity_costs", "Tabella che contiene costi associati alle attività");
addDescriptionTable("stb_activity_dw_syntax_ft", "Tabella che contiene filtri attività relativi al salvataggio della sintassi dei datawindow");
addDescriptionTable("stb_activity_log", "Tabella che contiene log attività attualmente aperte per utente");
addDescriptionTable("stb_activity_reports", "Tabella che contiene elenco report agganciati alle attività");
addDescriptionTable("stb_activity_result", "Tabella che contiene Esiti Attività");
addDescriptionTable("stb_apulia_transaction_count", "Tabella che contiene numero progressivo transazioni nell'anno");
addDescriptionTable("stb_apulia_transaction_log", "Tabella che contiene registrazione log transazioni");
addDescriptionTable("stb_calr_ore_gg", "Tabella che contiene righe calendario");
addDescriptionTable("stb_calt", "Tabella che contiene Testata calendario");
addDescriptionTable("stb_dw_syntax", "Tabella che contiene salvataggio sintassi datawindow");
addDescriptionTable("stb_publications_detail", "Tabella che contiene dettagli pubblicazione");
addDescriptionTable("stb_sync", "Tabella che contiene processi in esecuzione");
addDescriptionTable("stb_tipi_indirizzi", "Tabella che contiene tipologie indirizzi per invio tramite mail");
addDescriptionTable("stb_transaction_log", "Tabella che contiene log transazioni utente su gestioni");
addDescriptionTable("vtb_agen_group", "Tabella che contiene Agenti-Gruppi Merceologic");
addDescriptionTable("vtb_ass", "Tabella che contiene associazione nazionale clienti");
addDescriptionTable("vtb_auto_km", "Tabella che contiene km percorsi automezzo");
addDescriptionTable("vtb_clie", "Tabella che contiene Clienti: Codizioni Usuali di Vendita");
addDescriptionTable("vtb_compensi_tdr", "Tabella che contiene righe compensi transfert delivery");
addDescriptionTable("vtb_compensi_tdt", "Tabella che contiene testate compensi Transfert");
addDescriptionTable("vtb_dest_intercode", "Tabella che contiene punti vendita Intercode");
addDescriptionTable("vtb_dest_intercode_setup", "Tabella che contiene configurazione caratteristiche");
addDescriptionTable("vtb_dist_tdr", "Tabella che contiene righe distinte trasfert delivery");
addDescriptionTable("vtb_dist_tdt", "Tabella che contiene testate distinte trasfert delivery");
addDescriptionTable("vtb_griglia", "Tabella che contiene griglia assortimento");
addDescriptionTable("vtb_griglia_art", "Tabella che contiene assortimento articoli");
addDescriptionTable("vtb_grp_acq", "Tabella che contiene gruppi acquisto cliente");
addDescriptionTable("vtb_list_data", "Tabella che contiene Listini di vendita in data");
addDescriptionTable("vtb_ord_giror", "Tabella che contiene righe ordine di giro clienti");
addDescriptionTable("vtb_ord_girot", "Tabella che contiene testate ordine di giro clienti");
addDescriptionTable("vtb_premi_artr", "Tabella che contiene righe premi su articolo");
addDescriptionTable("vtb_premi_artt", "Tabella che contiene testate premi su articoli");
addDescriptionTable("vtb_promo_articoli", "Tabella che contiene promozione articoli");
addDescriptionTable("vtb_promo_clienti", "Tabella che contiene promozione clienti");
addDescriptionTable("vtb_promo_omaggi", "Tabella che contiene promozioni omaggi");
addDescriptionTable("vtb_promo_sconti", "Tabella che contiene sconti promozionali");
addDescriptionTable("vtb_tipi_negozio", "Tabella che contiene Tipologia Negozio");
addDescriptionTable("vtb_tipo_bloc_cons", "Tabella che contiene tipo blocco consegna");
addDescriptionTable("vtb_vett_cap", "Tabella che contiene Vettore-Zona-Nazione-CAP");
addDescriptionTable("vtb_vett_lett", "Tabella che contiene Lettera di vettura");
addDescriptionTable("vtb_vett_nazioni", "Tabella che contiene Vettore-Zone-Nazioni");
addDescriptionTable("vtb_vett_zone", "Tabella che contiene Vettore-Zone Tariffarie");
addDescriptionTable("wtb_clie", "Tabella che contiene associazioni utenti web-clienti");
addDescriptionTable("wtb_clie_dest", "Tabella che contiene associazioni utenti web-destinatari");
addDescriptionTable("wtb_users_info_plan_status", "Tabella che contiene contenente lo stato (ultima da export) dell'export");
}
@Override
public void down() throws Exception {
}
}