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

13 lines
310 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`shelving_afterDelete`
AFTER DELETE ON `shelving`
FOR EACH ROW
BEGIN
INSERT INTO shelvingLog
SET `action` = 'delete',
`changedModel` = 'Shelving',
`changedModelId` = OLD.id,
`userFk` = account.myUser_getId();
END$$
DELIMITER ;