2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
2024-01-25 16:33:54 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketService_afterUpdate`
|
2024-01-15 11:31:03 +00:00
|
|
|
AFTER UPDATE ON `ticketService`
|
|
|
|
FOR EACH ROW
|
|
|
|
BEGIN
|
|
|
|
IF !(NEW.price <=> OLD.price)
|
|
|
|
OR !(NEW.ticketFk <=> OLD.ticketFk)
|
|
|
|
OR !(NEW.quantity <=> OLD.quantity) THEN
|
|
|
|
CALL ticket_requestRecalc(NEW.ticketFk);
|
|
|
|
CALL ticket_requestRecalc(OLD.ticketFk);
|
|
|
|
END IF;
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|