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

14 lines
289 B
MySQL
Raw Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`shelving_beforeInsert`
BEFORE INSERT ON `shelving`
FOR EACH ROW
BEGIN
SET NEW.editorFk = account.myUser_getId();
IF NEW.code = "" THEN
CALL util.throw('NOT_EMPTY_CODE_ALLOWED');
END IF;
END$$
DELIMITER ;