13 lines
300 B
SQL
13 lines
300 B
SQL
DELIMITER $$
|
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`business_afterUpdate`
|
|
AFTER UPDATE ON `business`
|
|
FOR EACH ROW
|
|
BEGIN
|
|
CALL worker_updateBusiness(NEW.workerFk);
|
|
|
|
IF NOT (OLD.workerFk <=> NEW.workerFk) THEN
|
|
CALL worker_updateBusiness(OLD.workerFk);
|
|
END IF;
|
|
END$$
|
|
DELIMITER ;
|