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

11 lines
283 B
MySQL
Raw Normal View History

DELIMITER $$
2024-01-25 16:33:54 +00:00
CREATE OR REPLACE DEFINER=`root`@`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 ;