2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
2024-07-22 09:52:42 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workerTimeControl_afterInsert`
|
2024-01-15 11:31:03 +00:00
|
|
|
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
|
2024-01-15 11:31:03 +00:00
|
|
|
CALL util.throw('date in the future');
|
2024-01-25 16:33:54 +00:00
|
|
|
END IF;
|
2024-01-15 11:31:03 +00:00
|
|
|
END$$
|
|
|
|
DELIMITER ;
|