salix/db/routines/vn/triggers/item_beforeUpdate.sql

15 lines
312 B
MySQL
Raw Permalink Normal View History

DELIMITER $$
2024-08-20 08:06:10 +00:00
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`item_beforeUpdate`
BEFORE UPDATE ON `item`
FOR EACH ROW
BEGIN
DECLARE vNewPackingShelve INT;
SET NEW.editorFk = account.myUser_getId();
IF NEW.itemPackingTypeFk = '' THEN
SET NEW.itemPackingTypeFk = NULL;
END IF;
END$$
DELIMITER ;