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