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

16 lines
406 B
MySQL
Raw Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`vn-admin`@`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 ;