projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f5af240
)
mysql/core_notify_trigger_after_update.sql
author
Alan Knowles
<alan@roojs.com>
Tue, 4 Jul 2017 02:26:22 +0000
(10:26 +0800)
committer
Alan Knowles
<alan@roojs.com>
Tue, 4 Jul 2017 02:26:22 +0000
(10:26 +0800)
mysql/core_notify_trigger_after_update.sql
patch
|
blob
|
history
diff --git
a/mysql/core_notify_trigger_after_update.sql
b/mysql/core_notify_trigger_after_update.sql
index
0d343cc
..
4297371
100644
(file)
--- a/
mysql/core_notify_trigger_after_update.sql
+++ b/
mysql/core_notify_trigger_after_update.sql
@@
-10,11
+10,11
@@
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 OR NEW.act_when != OLD.act_when ) THEN
+ IF (OLD.sent IS NOT NULL AND OLD.sent != '0000-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;
END;
-
$$