From 08cb1241bf4fb0c529dcde98ef434aec0e713b2e Mon Sep 17 00:00:00 2001 From: sergiodt Date: Thu, 26 Sep 2024 11:53:33 +0200 Subject: [PATCH] fix: refs #5890 recovery ItemShelving_afterInsert --- .../vn/triggers/itemShelving_afterInsert.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 db/routines/vn/triggers/itemShelving_afterInsert.sql diff --git a/db/routines/vn/triggers/itemShelving_afterInsert.sql b/db/routines/vn/triggers/itemShelving_afterInsert.sql new file mode 100644 index 000000000..92243ca03 --- /dev/null +++ b/db/routines/vn/triggers/itemShelving_afterInsert.sql @@ -0,0 +1,18 @@ +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 ;