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

13 lines
328 B
SQL

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