projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec77499
)
mysql/core_notify_trigger_after_update.sql
author
Alan Knowles
<alan@roojs.com>
Mon, 28 Nov 2016 03:58:44 +0000
(11:58 +0800)
committer
Alan Knowles
<alan@roojs.com>
Mon, 28 Nov 2016 03:58:44 +0000
(11:58 +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
6f4a37d
..
71f6548
100644
(file)
--- a/
mysql/core_notify_trigger_after_update.sql
+++ b/
mysql/core_notify_trigger_after_update.sql
@@
-9,6
+9,15
@@
CREATE TRIGGER core_notify_trigger_after_update
BEFORE UPDATE ON core_notify
FOR EACH ROW
BEGIN
- DECLARE mid INT(11);
- IF (@DISABLE_TRIGGER IS NULL AND @DISABLE_TRIGGER_{$tbl} IS NULL ) THEN
-
\ No newline at end of file
+ -- 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;
+ END IF;
+ END;
+
+$$
+
+
+DELIMITER ;
+
+
\ No newline at end of file