15 lines
312 B
SQL
15 lines
312 B
SQL
DELIMITER $$
|
|
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 ;
|