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

13 lines
334 B
MySQL
Raw Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`packingSite_afterDelete`
AFTER DELETE ON `packingSite`
FOR EACH ROW
BEGIN
INSERT INTO packingSiteDeviceLog
SET `action` = 'delete',
`changedModel` = 'PackingSite',
`changedModelId` = OLD.id,
`userFk` = account.myUser_getId();
END$$
DELIMITER ;