salix/db/routines/vn/triggers/workerTimeControl_afterInse...

11 lines
287 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workerTimeControl_afterInsert`
AFTER INSERT ON `workerTimeControl`
FOR EACH ROW
BEGIN
IF NEW.timed > (util.VN_NOW() + INTERVAL 1 DAY) THEN
CALL util.throw('date in the future');
END IF;
END$$
DELIMITER ;