2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
2024-08-20 08:06:10 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticket_afterUpdate`
|
2024-01-15 11:31:03 +00:00
|
|
|
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;
|
2024-05-07 06:00:26 +00:00
|
|
|
|
2024-06-05 11:42:21 +00:00
|
|
|
IF NEW.cmrFk THEN
|
|
|
|
CALL ticket_doCmr(NEW.id);
|
|
|
|
END IF;
|
2024-01-15 11:31:03 +00:00
|
|
|
END IF;
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|