fix #8131 - chinese translations
[Pman.Core] / mysql / core_notify_trigger_after_delete.sql
1
2
3 -- can not delete 'sent' notifications -- trick is to 'null the sent before deleting...
4
5 DROP TRIGGER IF EXISTS core_notify_trigger_after_delete;
6
7 DELIMITER $$
8  
9 CREATE TRIGGER core_notify_trigger_after_delete AFTER DELETE on core_notify
10     FOR EACH ROW
11         BEGIN
12             -- I think we changed it so that sent is not null, deafult '0000....'
13             if old.sent is not null AND old.sent > '0001-01-01 00:00:00' THEN 
14                 UPDATE `Error: Can not delete core_notify after it is sent` SET x = 1;
15             END IF;
16         END;
17
18 $$
19  
20
21 DELIMITER ;