15 lines
328 B
MySQL
15 lines
328 B
MySQL
|
DELIMITER $$
|
||
|
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `bs`.`nightTaskBeforeUpdate`
|
||
|
BEFORE UPDATE ON `nightTask`
|
||
|
FOR EACH ROW
|
||
|
BEGIN
|
||
|
|
||
|
IF NOT (NEW.`schema`REGEXP '^[0-9a-zA-Z_]+$') OR NOT (NEW.`procedure`REGEXP '^[0-9a-zA-Z_]+$') THEN
|
||
|
|
||
|
CALL util.throw('ONLY_ALPHANUMERICS_ALLOWED');
|
||
|
|
||
|
END IF;
|
||
|
|
||
|
END$$
|
||
|
DELIMITER ;
|