salix/db/routines/vn/triggers/ticket_afterDelete.sql

13 lines
302 B
SQL

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