salix/db/routines/account/triggers/role_beforeInsert.sql

10 lines
237 B
MySQL
Raw Permalink Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`role_beforeInsert`
BEFORE INSERT ON `role`
FOR EACH ROW
BEGIN
SET NEW.editorFk = account.myUser_getId();
CALL role_checkName(NEW.`name`);
END$$
DELIMITER ;