diff --git a/db/versions/10862-navyHydrangea/02-updateExpense.sql b/db/versions/10862-navyHydrangea/02-updateExpense.sql index 917c2afb5..56364a600 100644 --- a/db/versions/10862-navyHydrangea/02-updateExpense.sql +++ b/db/versions/10862-navyHydrangea/02-updateExpense.sql @@ -25,7 +25,6 @@ SET id = CASE id WHEN 7001080000 THEN 7000108000 WHEN 7002080000 THEN 7001208000 WHEN 7000090000 THEN 7001009000 - WHEN 7000100000 THEN 7001010000 WHEN 7002090000 THEN 7001209000 WHEN 7002100000 THEN 7001210000 WHEN 7001090000 THEN 7001109000 @@ -42,5 +41,5 @@ WHERE id IN (7000010000, 7000020000, 7000030000, 7000040000, 7000050000, 7002040000, 7002050000, 7002020000, 7002010000, 7001060000, 7001070000, 7001030000, 7001040000, 7001050000, 7001020000, 7001010000, 7000080000, 7001080000, 7002080000, 7000090000, - 7000100000, 7002090000, 7002100000, 7001090000, 7001100000, + 7002090000, 7002100000, 7001090000, 7001100000, 7000120000, 7002120000, 7000130000, 7000140000, 7000008000); diff --git a/db/versions/10862-navyHydrangea/03-updateExpenseConflict.sql b/db/versions/10862-navyHydrangea/03-updateExpenseConflict.sql new file mode 100644 index 000000000..0e008081b --- /dev/null +++ b/db/versions/10862-navyHydrangea/03-updateExpenseConflict.sql @@ -0,0 +1,6 @@ +UPDATE vn.expense +SET id = CASE id + WHEN 7000100000 THEN 7001010000 + ELSE id +END +WHERE id IN (7000100000); diff --git a/db/versions/10862-navyHydrangea/03-balanceNestTree.sql b/db/versions/10862-navyHydrangea/04-balanceNestTree.sql similarity index 94% rename from db/versions/10862-navyHydrangea/03-balanceNestTree.sql rename to db/versions/10862-navyHydrangea/04-balanceNestTree.sql index 0cfb02ff2..e086a656d 100644 --- a/db/versions/10862-navyHydrangea/03-balanceNestTree.sql +++ b/db/versions/10862-navyHydrangea/04-balanceNestTree.sql @@ -26,7 +26,6 @@ UPDATE vn.balanceNestTree WHEN 7001080000 THEN 7001108000 WHEN 7002080000 THEN 7001208000 WHEN 7000090000 THEN 7001009000 - WHEN 7000100000 THEN 7001010000 WHEN 7002090000 THEN 7001209000 WHEN 7002100000 THEN 7001210000 WHEN 7001090000 THEN 7001109000 @@ -43,5 +42,5 @@ UPDATE vn.balanceNestTree 7002040000, 7002050000, 7002020000, 7002010000, 7001060000, 7001070000, 7001030000, 7001040000, 7001050000, 7001020000, 7001010000, 7000080000, 7001080000, 7002080000, 7000090000, - 7000100000, 7002090000, 7002100000, 7001090000, 7001100000, + 7002090000, 7002100000, 7001090000, 7001100000, 7000120000, 7002120000, 7000130000, 7000140000, 7000008000); diff --git a/db/versions/10862-navyHydrangea/05-balanceNestTreeConflict.sql b/db/versions/10862-navyHydrangea/05-balanceNestTreeConflict.sql new file mode 100644 index 000000000..dddc82888 --- /dev/null +++ b/db/versions/10862-navyHydrangea/05-balanceNestTreeConflict.sql @@ -0,0 +1,6 @@ +UPDATE vn.balanceNestTree + SET expenseFk = CASE expenseFk + WHEN 7000100000 THEN 7001010000 + ELSE expenseFk + END + WHERE expenseFk IN (7000100000); diff --git a/db/versions/10862-navyHydrangea/04-updateItem.sql b/db/versions/10862-navyHydrangea/06-updateItem.sql similarity index 100% rename from db/versions/10862-navyHydrangea/04-updateItem.sql rename to db/versions/10862-navyHydrangea/06-updateItem.sql diff --git a/db/versions/10862-navyHydrangea/05-updateGastosResumen copy.sql b/db/versions/10862-navyHydrangea/07-updateGastosResumen.sql similarity index 69% rename from db/versions/10862-navyHydrangea/05-updateGastosResumen copy.sql rename to db/versions/10862-navyHydrangea/07-updateGastosResumen.sql index 94b7a0385..70f22c1e6 100644 --- a/db/versions/10862-navyHydrangea/05-updateGastosResumen copy.sql +++ b/db/versions/10862-navyHydrangea/07-updateGastosResumen.sql @@ -23,18 +23,18 @@ SET Id_Gasto = CASE Id_Gastos WHEN 7001020000 THEN 7001102000 WHEN 7001010000 THEN 7001101000 WHEN 7000080000 THEN 7000008000 - WHEN 7001080000 THEN 7000108000 - WHEN 7002080000 THEN 7000208000 - WHEN 7000090000 THEN 7000009000 - WHEN 7000100000 THEN 7000010000 - WHEN 7002090000 THEN 7000209000 - WHEN 7002100000 THEN 7000210000 - WHEN 7001090000 THEN 7000109000 - WHEN 7001100000 THEN 7000110000 - WHEN 7000120000 THEN 7000012000 - WHEN 7002120000 THEN 7000212000 - WHEN 7000130000 THEN 7000013000 - WHEN 7000140000 THEN 7000014000 + WHEN 7001080000 THEN 7001108000 + WHEN 7002080000 THEN 7001208000 + WHEN 7000090000 THEN 7001009000 + WHEN 7002090000 THEN 7001209000 + WHEN 7002100000 THEN 7001210000 + WHEN 7001090000 THEN 7001109000 + WHEN 7001100000 THEN 7001110000 + WHEN 7000120000 THEN 7001012000 + WHEN 7002120000 THEN 7001212000 + WHEN 7000130000 THEN 7001013000 + WHEN 7000140000 THEN 7001014000 + WHEN 7000008000 THEN 7040008000 ELSE Id_Gastos END WHERE Id_Gastos IN (7000010000, 7000020000, 7000030000, 7000040000, 7000050000, @@ -42,6 +42,6 @@ WHERE Id_Gastos IN (7000010000, 7000020000, 7000030000, 7000040000, 7000050000, 7002040000, 7002050000, 7002020000, 7002010000, 7001060000, 7001070000, 7001030000, 7001040000, 7001050000, 7001020000, 7001010000, 7000080000, 7001080000, 7002080000, 7000090000, - 7000100000, 7002090000, 7002100000, 7001090000, 7001100000, - 7000120000, 7002120000, 7000130000, 7000140000); + 7002090000, 7002100000, 7001090000, 7001100000, + 7000120000, 7002120000, 7000130000, 7000140000, 7000008000); diff --git a/db/versions/10862-navyHydrangea/08-updateGastosResumenConflict.sql b/db/versions/10862-navyHydrangea/08-updateGastosResumenConflict.sql new file mode 100644 index 000000000..82b1aef2d --- /dev/null +++ b/db/versions/10862-navyHydrangea/08-updateGastosResumenConflict.sql @@ -0,0 +1,8 @@ +-- en el futuro expenseSummary +UPDATE vn2008.gastos_resumen +SET Id_Gasto = CASE Id_Gastos + WHEN 7000100000 THEN 7000010000 + ELSE Id_Gastos +END +WHERE Id_Gastos IN (7000100000); + diff --git a/db/versions/10862-navyHydrangea/06-updateVentasContables.sql b/db/versions/10862-navyHydrangea/09-updateVentasContables.sql similarity index 100% rename from db/versions/10862-navyHydrangea/06-updateVentasContables.sql rename to db/versions/10862-navyHydrangea/09-updateVentasContables.sql