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