From 1799b52f8b8fc0ac5188c38876aacb3aeb2f5a8d Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 5 Jul 2024 12:37:59 +0200 Subject: [PATCH 1/3] feat: refs #7622 Added type column addressWaste --- db/routines/vn/procedures/item_setVisibleDiscard.sql | 3 ++- db/versions/11136-maroonMedeola/00-firstScript.sql | 6 ++++++ .../models/{addressShortage.json => address-waste.json} | 8 ++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 db/versions/11136-maroonMedeola/00-firstScript.sql rename modules/client/back/models/{addressShortage.json => address-waste.json} (70%) diff --git a/db/routines/vn/procedures/item_setVisibleDiscard.sql b/db/routines/vn/procedures/item_setVisibleDiscard.sql index 0a6c54971..a44d87333 100644 --- a/db/routines/vn/procedures/item_setVisibleDiscard.sql +++ b/db/routines/vn/procedures/item_setVisibleDiscard.sql @@ -6,7 +6,8 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_setVisibleDisc vAddressFk INT) BEGIN /** - * Procedimiento para dar dar de baja/alta un item, si vAddressFk es NULL se entiende que se da de alta y se toma el addressFk de la configuración + * Procedimiento para dar dar de baja/alta un item, si vAdressFk es NULL + * se entiende que se da de alta y se toma el addressFk de la configuración * * @param vItemFk Identificador del ítem * @param vWarehouseFk id del warehouse diff --git a/db/versions/11136-maroonMedeola/00-firstScript.sql b/db/versions/11136-maroonMedeola/00-firstScript.sql new file mode 100644 index 000000000..09abfe391 --- /dev/null +++ b/db/versions/11136-maroonMedeola/00-firstScript.sql @@ -0,0 +1,6 @@ +RENAME TABLE vn.addressShortage TO vn.addressWaste; +ALTER TABLE vn.addressWaste ADD `type` ENUM('internal', 'external') NOT NULL; +INSERT INTO IGNORE vn.addressWaste (addressFk,`type`) VALUES + (2230,'external'), + (5986,'external'), + (7475,'external'); diff --git a/modules/client/back/models/addressShortage.json b/modules/client/back/models/address-waste.json similarity index 70% rename from modules/client/back/models/addressShortage.json rename to modules/client/back/models/address-waste.json index 1ae8d986c..2d7126eae 100644 --- a/modules/client/back/models/addressShortage.json +++ b/modules/client/back/models/address-waste.json @@ -1,15 +1,19 @@ { - "name": "AddressShortage", + "name": "AddressWaste", "base": "VnModel", "options": { "mysql": { - "table": "addressShortage" + "table": "addressWaste" } }, "properties": { "addressFk": { "type": "number", "id": true + }, + "type": { + "type": "string", + "id": true } }, "relations": { From b9e986c9627c26921e880245e4b7c8c264e55a64 Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 5 Jul 2024 12:39:54 +0200 Subject: [PATCH 2/3] feat: refs #7622 Fix --- db/versions/11136-maroonMedeola/00-firstScript.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/versions/11136-maroonMedeola/00-firstScript.sql b/db/versions/11136-maroonMedeola/00-firstScript.sql index 09abfe391..b0b92c7e9 100644 --- a/db/versions/11136-maroonMedeola/00-firstScript.sql +++ b/db/versions/11136-maroonMedeola/00-firstScript.sql @@ -1,6 +1,6 @@ RENAME TABLE vn.addressShortage TO vn.addressWaste; ALTER TABLE vn.addressWaste ADD `type` ENUM('internal', 'external') NOT NULL; -INSERT INTO IGNORE vn.addressWaste (addressFk,`type`) VALUES +INSERT IGNORE INTO vn.addressWaste (addressFk,`type`) VALUES (2230,'external'), (5986,'external'), (7475,'external'); From be83fa672957c57014cce14e8d20ef497e706985 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 9 Jul 2024 11:13:55 +0200 Subject: [PATCH 3/3] fix: refs #7622 Fix --- modules/client/back/model-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/client/back/model-config.json b/modules/client/back/model-config.json index fc1254dd8..e6690ee5f 100644 --- a/modules/client/back/model-config.json +++ b/modules/client/back/model-config.json @@ -5,7 +5,7 @@ "AddressObservation": { "dataSource": "vn" }, - "AddressShortage": { + "AddressWaste": { "dataSource": "vn" }, "BankEntity": {