From aeb80e5d99a54a12fabb8477daf4b4ed5b909bb2 Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 1 Nov 2023 08:56:09 +0800 Subject: [PATCH] fix trigger --- mysql/core_notify_trigger_after_update.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql/core_notify_trigger_after_update.sql b/mysql/core_notify_trigger_after_update.sql index 4297371b..4f5bfbac 100644 --- a/mysql/core_notify_trigger_after_update.sql +++ b/mysql/core_notify_trigger_after_update.sql @@ -10,7 +10,7 @@ CREATE TRIGGER core_notify_trigger_after_update FOR EACH ROW BEGIN -- make sure that act_start does not get modified if sent is set. - IF (OLD.sent IS NOT NULL AND OLD.sent != '0000-00-00 00:00:00') + IF (OLD.sent IS NOT NULL AND OLD.sent > '1500-00-00 00:00:00') AND ( NEW.act_start != OLD.act_start OR NEW.act_when != OLD.act_when ) THEN UPDATE `Error: Can not update core_notify action dates after its sent` SET x = 1; END IF; -- 2.39.2