2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
2024-08-20 08:06:10 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`entry_afterUpdate`
|
2024-01-15 11:31:03 +00:00
|
|
|
AFTER UPDATE ON `entry`
|
|
|
|
FOR EACH ROW
|
|
|
|
BEGIN
|
2024-01-30 14:07:13 +00:00
|
|
|
IF NOT (NEW.travelFk <=> OLD.travelFk) THEN
|
|
|
|
CREATE OR REPLACE TEMPORARY TABLE tmp.buysToCheck
|
|
|
|
SELECT b.id
|
|
|
|
FROM buy b
|
|
|
|
WHERE b.entryFk = NEW.id;
|
2024-04-08 07:11:40 +00:00
|
|
|
|
2024-01-30 14:07:13 +00:00
|
|
|
CALL buy_checkItem();
|
|
|
|
END IF;
|
2024-01-15 11:31:03 +00:00
|
|
|
END$$
|
|
|
|
DELIMITER ;
|