salix/db/routines/vn/triggers/ticketObservation_afterDele...

13 lines
335 B
SQL

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