14 lines
375 B
SQL
14 lines
375 B
SQL
DELIMITER $$
|
|
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketService_au`
|
|
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 ;
|