14 lines
285 B
MySQL
14 lines
285 B
MySQL
|
DELIMITER $$
|
||
|
CREATE OR REPLACE DEFINER=`root`@`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 ;
|