create viste per contabilità
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good

This commit is contained in:
2025-11-20 18:25:34 +01:00
parent cd389dc83f
commit 62a1f5a85f

View File

@@ -0,0 +1,41 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20251120181812 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
createOrUpdateView("cvw_tipi_pdc", "CREATE VIEW cvw_tipi_pdc AS\n" +
"SELECT '1' AS codice, Upper('Attivo') descrizione, '1' as sezione\n" +
" UNION ALL\n" +
" SELECT '2', Upper('Passivo'), '1' as sezione\n" +
" UNION ALL\n" +
" SELECT '3', Upper('Netto'), '1' as sezione\n" +
" UNION ALL\n" +
" SELECT '4', Upper('Costi'), '2' as sezione\n" +
" UNION ALL\n" +
" SELECT '5', Upper('Ricavi'), '2' as sezione\n" +
" UNION ALL\n" +
" SELECT '6', Upper('D''ordine'), '3'\n" +
" UNION ALL\n" +
" SELECT '7', Upper('Epilogativi'), '3'");
createOrUpdateView("cvw_sezione_pdc", "CREATE VIEW cvw_sezione_pdc AS\n" +
"SELECT '1' AS codice, Upper('Stato Patrimoniale') AS descrizione\n" +
"UNION ALL\n" +
"SELECT '2', Upper('Conto Economico')\n" +
"UNION ALL\n" +
"SELECT '3', upper('Conti d''ordine e di Riepilogo')");
}
@Override
public void down() throws Exception {
}
}