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