fix trigger
authorAlan <alan@roojs.com>
Wed, 1 Nov 2023 00:56:09 +0000 (08:56 +0800)
committerAlan <alan@roojs.com>
Wed, 1 Nov 2023 00:56:09 +0000 (08:56 +0800)
mysql/core_notify_trigger_after_update.sql

index 4297371..4f5bfba 100644 (file)
@@ -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;