diff --git a/db/routines/vn/procedures/itemShelvingLog_get.sql b/db/routines/vn/procedures/itemShelvingLog_get.sql deleted file mode 100644 index 5a943e867..000000000 --- a/db/routines/vn/procedures/itemShelvingLog_get.sql +++ /dev/null @@ -1,36 +0,0 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingLog_get`( - vShelvingCode VARCHAR(10) -) -BEGIN -/** - * Devuelve el log de los item en cada carro - * - * @param vShelvingCode MatrĂ­cula del carro - * - */ - SELECT isl.itemShelvingFk, - isl.created, - isl.accion, - isl.itemFk, - isl.shelvingFk, - isl.quantity, - isl.visible, - isl.available, - isl.grouping, - isl.packing, - isl.stars, - item.longName, - item.size, - item.subName, - worker.code, - isl.accion - FROM item - JOIN itemShelvingLog isl ON item.id = isl.itemFk - JOIN worker ON isl.workerFk = worker.id - JOIN shelving sh ON sh.id = isl.shelvingFk - WHERE sh.code = vShelvingCode COLLATE utf8mb3_unicode_ci - OR isl.itemFk = vShelvingCode -- ?? Respeto porque ya estaba - ORDER BY isl.created DESC; -END$$ -DELIMITER ; diff --git a/db/routines/vn/triggers/itemShelving_afterInsert.sql b/db/routines/vn/triggers/itemShelving_afterInsert.sql deleted file mode 100644 index 92243ca03..000000000 --- a/db/routines/vn/triggers/itemShelving_afterInsert.sql +++ /dev/null @@ -1,18 +0,0 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemShelving_afterInsert` - AFTER INSERT ON `itemShelving` - FOR EACH ROW -BEGIN - INSERT INTO itemShelvingLog - SET itemShelvingFk = NEW.id, - workerFk = account.myUser_getId(), - accion = 'CREA REGISTRO', - itemFk = NEW.itemFk, - shelvingFk = NEW.shelvingFk, - visible = NEW.visible, - `grouping` = NEW.`grouping`, - packing = NEW.packing, - available = NEW.available; - -END$$ -DELIMITER ; diff --git a/db/routines/vn/triggers/itemShelving_afterUpdate.sql b/db/routines/vn/triggers/itemShelving_afterUpdate.sql deleted file mode 100644 index e5e63db43..000000000 --- a/db/routines/vn/triggers/itemShelving_afterUpdate.sql +++ /dev/null @@ -1,18 +0,0 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemShelving_afterUpdate` - AFTER UPDATE ON `itemShelving` - FOR EACH ROW -BEGIN - INSERT INTO itemShelvingLog - SET itemShelvingFk = NEW.id, - workerFk = account.myUser_getId(), - accion = 'CAMBIO', - itemFk = NEW.itemFk, - shelvingFk = NEW.shelvingFk, - visible = NEW.visible, - `grouping` = NEW.`grouping`, - packing = NEW.packing, - available = NEW.available; - -END$$ -DELIMITER ; diff --git a/db/routines/vn/triggers/itemShelving_beforeDelete.sql b/db/routines/vn/triggers/itemShelving_beforeDelete.sql deleted file mode 100644 index 89737a841..000000000 --- a/db/routines/vn/triggers/itemShelving_beforeDelete.sql +++ /dev/null @@ -1,15 +0,0 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemShelving_beforeDelete` - BEFORE DELETE ON `itemShelving` - FOR EACH ROW -INSERT INTO vn.itemShelvingLog(itemShelvingFk, - workerFk, - accion, - shelvingFk, - itemFk) - VALUES( OLD.id, - account.myUser_getId(), - 'ELIMINADO', - OLD.shelvingFk, - OLD.itemFk)$$ -DELIMITER ; diff --git a/db/versions/11366-navyBirch/00-firstScript.sql b/db/versions/11366-navyBirch/00-firstScript.sql new file mode 100644 index 000000000..4d56c13b8 --- /dev/null +++ b/db/versions/11366-navyBirch/00-firstScript.sql @@ -0,0 +1,2 @@ +RENAME TABLE vn.itemShelvingLog TO vn.itemShelvingLog__; +ALTER TABLE vn.itemShelvingLog__ COMMENT='@deprecated 2024-11-26'; diff --git a/modules/item/back/model-config.json b/modules/item/back/model-config.json index dcd973524..c386a8eaa 100644 --- a/modules/item/back/model-config.json +++ b/modules/item/back/model-config.json @@ -56,9 +56,6 @@ "ItemShelving": { "dataSource": "vn" }, - "ItemShelvingLog": { - "dataSource": "vn" - }, "ItemShelvingSale": { "dataSource": "vn" }, diff --git a/modules/item/back/models/item-shelving-log.json b/modules/item/back/models/item-shelving-log.json deleted file mode 100644 index f976008f1..000000000 --- a/modules/item/back/models/item-shelving-log.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "ItemShelvingLog", - "base": "VnModel", - "mixins": { - "Loggable": true - }, - "options": { - "mysql": { - "table": "itemShelvingLog" - } - }, - "properties": { - "id": { - "type": "number", - "id": true, - "description": "Identifier" - }, - "created": { - "type": "date" - }, - "shelvingFk": { - "type": "string" - }, - "itemFk": { - "type": "number" - }, - "visible": { - "type": "number" - }, - "accion": { - "type": "string" - } - }, - "relations": { - "item": { - "type": "belongsTo", - "model": "Item", - "foreignKey": "itemFk" - }, - "worker": { - "type": "belongsTo", - "model": "Worker", - "foreignKey": "workerFk" - }, - "shelving": { - "type": "belongsTo", - "model": "Shelving", - "foreignKey": "shelvingFk", - "primaryKey": "code" - } - } -} \ No newline at end of file diff --git a/myt.config.yml b/myt.config.yml index 92936869e..209686fd4 100755 --- a/myt.config.yml +++ b/myt.config.yml @@ -258,7 +258,6 @@ localFixtures: - itemFamily - itemLog - itemShelving - - itemShelvingLog - itemShelvingSale - itemTag - itemTaxCountry