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

11 lines
251 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemShelving_BEFORE_UPDATE`
BEFORE UPDATE ON `itemShelving`
FOR EACH ROW
BEGIN
IF NEW.userFk IS NULL THEN
SET NEW.userFk = account.myUser_getId();
END IF;
END$$
DELIMITER ;