From 4fed4c0c21ea4a043fa2552a2c1b10bc384f05ae Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 28 Nov 2016 12:01:21 +0800 Subject: [PATCH] mysql/core_notify_trigger_after_update.sql --- mysql/core_notify_trigger_after_update.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql/core_notify_trigger_after_update.sql b/mysql/core_notify_trigger_after_update.sql index 71f65483..db576b88 100644 --- a/mysql/core_notify_trigger_after_update.sql +++ b/mysql/core_notify_trigger_after_update.sql @@ -10,8 +10,8 @@ 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 NEW.act_start != OLD.act_start THEN - UPDATE `Error: Can not update core_notify act_start after its set` SET x = 1; + IF OLD.sent IS NOT NULL AND ( NEW.act_start != OLD.act_start OR NEW.act_when != OLD.act_when THEN + UPDATE `Error: Can not update core_notify act_start or when after its set` SET x = 1; END IF; END; -- 2.39.2