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