DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`roadmap_afterUpdate`
	AFTER UPDATE ON `roadmap`
	FOR EACH ROW
BEGIN
	DECLARE vSeconds INT;

	IF NOT (NEW.etd <=> OLD.etd) THEN
		SET vSeconds = TIME_TO_SEC(TIMEDIFF(NEW.etd, OLD.etd));
		IF vSeconds IS NOT NULL AND vSeconds <> 0 THEN
			UPDATE roadmapStop
				SET eta = eta + INTERVAL vSeconds SECOND
				WHERE roadmapFk = NEW.id;
		END IF;
	END IF;
END$$
DELIMITER ;