2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
2024-07-22 09:52:42 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`solunionCAP_beforeDelete`
|
2024-01-15 11:31:03 +00:00
|
|
|
BEFORE DELETE ON `solunionCAP`
|
|
|
|
FOR EACH ROW
|
|
|
|
BEGIN
|
2024-04-24 07:53:31 +00:00
|
|
|
UPDATE client c
|
2024-04-24 08:57:35 +00:00
|
|
|
JOIN creditClassification cc ON cc.client = c.id
|
2024-01-15 11:31:03 +00:00
|
|
|
JOIN creditInsurance ci ON ci.creditClassification = cc.id
|
|
|
|
SET creditInsurance = ci.credit WHERE ci.id = OLD.creditInsurance;
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|