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

12 lines
294 B
MySQL
Raw Normal View History

DELIMITER $$
2024-01-25 16:33:54 +00:00
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemShelving_beforeUpdate`
BEFORE UPDATE ON `itemShelving`
FOR EACH ROW
BEGIN
2024-01-25 16:33:54 +00:00
SET NEW.editorFk = account.myUser_getId();
IF NEW.userFk IS NULL THEN
SET NEW.userFk = account.myUser_getId();
END IF;
END$$
DELIMITER ;