13 lines
302 B
SQL
13 lines
302 B
SQL
DELIMITER $$
|
|
CREATE OR REPLACE DEFINER=`root`@`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 ;
|