From c81860155288d00050a7d40f3314e6d0cc27255f Mon Sep 17 00:00:00 2001 From: jgallego Date: Mon, 12 Feb 2024 08:45:47 +0100 Subject: [PATCH] feat: #6392 constraint solved --- .../10862-navyHydrangea/02-updateExpense.sql | 5 ++--- .../04-balanceNestTree.sql | 5 ++--- .../07-updateGastosResumen.sql | 21 +++++++++---------- .../08-updateGastosResumenConflict.sql | 6 +++--- 4 files changed, 17 insertions(+), 20 deletions(-) diff --git a/db/versions/10862-navyHydrangea/02-updateExpense.sql b/db/versions/10862-navyHydrangea/02-updateExpense.sql index 56364a600..a44c4c504 100644 --- a/db/versions/10862-navyHydrangea/02-updateExpense.sql +++ b/db/versions/10862-navyHydrangea/02-updateExpense.sql @@ -21,7 +21,7 @@ SET id = CASE id WHEN 7001050000 THEN 7001105000 WHEN 7001020000 THEN 7001102000 WHEN 7001010000 THEN 7001101000 - WHEN 7000080000 THEN 7000008000 + WHEN 7000080000 THEN 7040008000 WHEN 7001080000 THEN 7000108000 WHEN 7002080000 THEN 7001208000 WHEN 7000090000 THEN 7001009000 @@ -33,7 +33,6 @@ SET id = CASE id WHEN 7002120000 THEN 7001212000 WHEN 7000130000 THEN 7001013000 WHEN 7000140000 THEN 7001014000 - WHEN 7000008000 THEN 7040008000 ELSE id END WHERE id IN (7000010000, 7000020000, 7000030000, 7000040000, 7000050000, @@ -42,4 +41,4 @@ WHERE id IN (7000010000, 7000020000, 7000030000, 7000040000, 7000050000, 7001070000, 7001030000, 7001040000, 7001050000, 7001020000, 7001010000, 7000080000, 7001080000, 7002080000, 7000090000, 7002090000, 7002100000, 7001090000, 7001100000, - 7000120000, 7002120000, 7000130000, 7000140000, 7000008000); + 7000120000, 7002120000, 7000130000, 7000140000); diff --git a/db/versions/10862-navyHydrangea/04-balanceNestTree.sql b/db/versions/10862-navyHydrangea/04-balanceNestTree.sql index e086a656d..803f88dab 100644 --- a/db/versions/10862-navyHydrangea/04-balanceNestTree.sql +++ b/db/versions/10862-navyHydrangea/04-balanceNestTree.sql @@ -22,7 +22,7 @@ UPDATE vn.balanceNestTree WHEN 7001050000 THEN 7001105000 WHEN 7001020000 THEN 7001102000 WHEN 7001010000 THEN 7001101000 - WHEN 7000080000 THEN 7000008000 + WHEN 7000080000 THEN 7040008000 WHEN 7001080000 THEN 7001108000 WHEN 7002080000 THEN 7001208000 WHEN 7000090000 THEN 7001009000 @@ -34,7 +34,6 @@ UPDATE vn.balanceNestTree WHEN 7002120000 THEN 7001212000 WHEN 7000130000 THEN 7001013000 WHEN 7000140000 THEN 7001014000 - WHEN 7000008000 THEN 7040008000 ELSE expenseFk END WHERE expenseFk IN (7000010000, 7000020000, 7000030000, 7000040000, 7000050000, @@ -43,4 +42,4 @@ UPDATE vn.balanceNestTree 7001070000, 7001030000, 7001040000, 7001050000, 7001020000, 7001010000, 7000080000, 7001080000, 7002080000, 7000090000, 7002090000, 7002100000, 7001090000, 7001100000, - 7000120000, 7002120000, 7000130000, 7000140000, 7000008000); + 7000120000, 7002120000, 7000130000, 7000140000); diff --git a/db/versions/10862-navyHydrangea/07-updateGastosResumen.sql b/db/versions/10862-navyHydrangea/07-updateGastosResumen.sql index 70f22c1e6..e557cc7d6 100644 --- a/db/versions/10862-navyHydrangea/07-updateGastosResumen.sql +++ b/db/versions/10862-navyHydrangea/07-updateGastosResumen.sql @@ -1,6 +1,6 @@ -- en el futuro expenseSummary UPDATE vn2008.gastos_resumen -SET Id_Gasto = CASE Id_Gastos +SET Id_Gasto = CASE Id_Gasto WHEN 7000010000 THEN 7001001000 WHEN 7000020000 THEN 7001002000 WHEN 7000030000 THEN 7001003000 @@ -22,7 +22,7 @@ SET Id_Gasto = CASE Id_Gastos WHEN 7001050000 THEN 7001105000 WHEN 7001020000 THEN 7001102000 WHEN 7001010000 THEN 7001101000 - WHEN 7000080000 THEN 7000008000 + WHEN 7000080000 THEN 7040008000 WHEN 7001080000 THEN 7001108000 WHEN 7002080000 THEN 7001208000 WHEN 7000090000 THEN 7001009000 @@ -34,14 +34,13 @@ SET Id_Gasto = CASE Id_Gastos WHEN 7002120000 THEN 7001212000 WHEN 7000130000 THEN 7001013000 WHEN 7000140000 THEN 7001014000 - WHEN 7000008000 THEN 7040008000 - ELSE Id_Gastos + ELSE Id_Gasto END -WHERE Id_Gastos IN (7000010000, 7000020000, 7000030000, 7000040000, 7000050000, - 7000060000, 7000070000, 7002060000, 7002070000, 7002030000, - 7002040000, 7002050000, 7002020000, 7002010000, 7001060000, - 7001070000, 7001030000, 7001040000, 7001050000, 7001020000, - 7001010000, 7000080000, 7001080000, 7002080000, 7000090000, - 7002090000, 7002100000, 7001090000, 7001100000, - 7000120000, 7002120000, 7000130000, 7000140000, 7000008000); +WHERE Id_Gasto IN (7000010000, 7000020000, 7000030000, 7000040000, 7000050000, + 7000060000, 7000070000, 7002060000, 7002070000, 7002030000, + 7002040000, 7002050000, 7002020000, 7002010000, 7001060000, + 7001070000, 7001030000, 7001040000, 7001050000, 7001020000, + 7001010000, 7000080000, 7001080000, 7002080000, 7000090000, + 7002090000, 7002100000, 7001090000, 7001100000, + 7000120000, 7002120000, 7000130000, 7000140000); diff --git a/db/versions/10862-navyHydrangea/08-updateGastosResumenConflict.sql b/db/versions/10862-navyHydrangea/08-updateGastosResumenConflict.sql index 82b1aef2d..58722c4a9 100644 --- a/db/versions/10862-navyHydrangea/08-updateGastosResumenConflict.sql +++ b/db/versions/10862-navyHydrangea/08-updateGastosResumenConflict.sql @@ -1,8 +1,8 @@ -- en el futuro expenseSummary UPDATE vn2008.gastos_resumen -SET Id_Gasto = CASE Id_Gastos +SET Id_Gasto = CASE Id_Gasto WHEN 7000100000 THEN 7000010000 - ELSE Id_Gastos + ELSE Id_Gasto END -WHERE Id_Gastos IN (7000100000); +WHERE Id_Gasto IN (7000100000);