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