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

13 lines
330 B
SQL

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