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