salix/db/routines/account/triggers/mailAlias_afterDelete.sql

13 lines
316 B
SQL

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