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