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

11 lines
281 B
MySQL
Raw Normal View History

DELIMITER $$
2024-08-20 08:06:10 +00:00
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerTimeControl_afterInsert`
AFTER INSERT ON `workerTimeControl`
FOR EACH ROW
BEGIN
2024-01-25 16:33:54 +00:00
IF NEW.timed > (util.VN_NOW() + INTERVAL 1 DAY) THEN
CALL util.throw('date in the future');
2024-01-25 16:33:54 +00:00
END IF;
END$$
DELIMITER ;