2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
|
|
|
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticket_afterUpdate`
|
|
|
|
AFTER UPDATE ON `ticket`
|
|
|
|
FOR EACH ROW
|
|
|
|
BEGIN
|
|
|
|
IF NEW.routeFk <> OLD.routeFk THEN
|
2024-04-08 07:11:40 +00:00
|
|
|
UPDATE expedition
|
2024-01-15 11:31:03 +00:00
|
|
|
SET hasNewRoute = TRUE
|
|
|
|
WHERE ticketFk = NEW.id;
|
|
|
|
END IF;
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|