salix/db/routines/vn/triggers/itemShelving_BEFORE_DELETE.sql

16 lines
403 B
MySQL
Raw Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemShelving_BEFORE_DELETE`
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 ;