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