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