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

13 lines
322 B
SQL

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