salix/db/routines/hedera/triggers/link_afterUpdate.sql

12 lines
277 B
MySQL
Raw Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`link_afterUpdate`
AFTER UPDATE ON `link`
FOR EACH ROW
BEGIN
IF !(NEW.image <=> OLD.image) THEN
CALL image_unref('link', OLD.image);
CALL image_ref('link', NEW.image);
END IF;
END$$
DELIMITER ;