2024-01-25 16:33:54 +00:00
|
|
|
DELIMITER $$
|
2024-08-20 08:06:10 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`delivery_beforeUpdate`
|
2024-01-25 16:33:54 +00:00
|
|
|
BEFORE UPDATE ON `delivery`
|
|
|
|
FOR EACH ROW
|
|
|
|
BEGIN
|
2024-07-11 09:43:19 +00:00
|
|
|
IF (NEW.longitude IS NOT NULL
|
|
|
|
AND NEW.latitude IS NOT NULL
|
|
|
|
AND NEW.ticketFK IS NOT NULL)
|
|
|
|
THEN
|
|
|
|
CALL address_updateCoordinates(NEW.ticketFk, NEW.longitude, NEW.latitude);
|
2024-01-25 16:33:54 +00:00
|
|
|
END IF;
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|