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`.`item_afterInsert`
|
2024-01-15 11:31:03 +00:00
|
|
|
AFTER INSERT ON `item`
|
|
|
|
FOR EACH ROW
|
|
|
|
BEGIN
|
|
|
|
CALL hedera.image_ref('catalog', NEW.image);
|
|
|
|
|
|
|
|
INSERT INTO vn.itemTaxCountry(itemFk, countryFk) VALUES
|
|
|
|
(NEW.id, 1),
|
|
|
|
(NEW.id, 5);
|
|
|
|
|
|
|
|
DELETE ifr.*
|
|
|
|
FROM edi.item_free ifr
|
|
|
|
WHERE ifr.id = NEW.id;
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|