From 17fa1e10f64993e99141c353da9eb74fb51347ba Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 12 Jun 2024 07:33:10 +0200 Subject: [PATCH] feat: refs #6701 Added claimRatio_afterInsert --- db/routines/vn/triggers/claimRatio_afterUpdate.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 db/routines/vn/triggers/claimRatio_afterUpdate.sql 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 ;