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