diff --git a/db/routines/vn/triggers/claimRatio_afterUpdate.sql b/db/routines/vn/triggers/claimRatio_afterUpdate.sql new file mode 100644 index 000000000..daae7ecf0 --- /dev/null +++ b/db/routines/vn/triggers/claimRatio_afterUpdate.sql @@ -0,0 +1,11 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimRatio_afterUpdate` + AFTER UPDATE ON `claimRatio` + FOR EACH ROW +BEGIN + INSERT INTO clientRate(clientFk, `value`) + VALUES(NEW.clientFk, NEW.priceIncreasing) + ON DUPLICATE KEY UPDATE + `value` = VALUES(`value`); +END$$ +DELIMITER ;