salix/db/routines/vn/triggers/expeditionState_beforeInser...

9 lines
236 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`expeditionState_beforeInsert`
BEFORE INSERT ON `expeditionState`
FOR EACH ROW
BEGIN
SET NEW.userFk = IFNULL(NEW.userFk, account.myUser_getId());
END$$
DELIMITER ;