Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix minor problems with email notification.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:d7ccfb64a321da20b0f111313357dce6d1543ebe077bc421262ef36bd9841be3
User & Date: drh 2018-06-23 01:26:01
Context
2018-06-23
01:33
Futher corrections to the email alert trigger. check-in: 2c3b9030 user: drh tags: trunk
01:26
Fix minor problems with email notification. check-in: d7ccfb64 user: drh tags: trunk
01:24
Fix minor problems in email notification. check-in: 1cdf6f20 user: drh tags: trunk
Changes

Changes to src/email.c.

101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
** table.
*/
void email_triggers_enable(void){
  if( !db_table_exists("repository","pending_alert") ) return;
  db_multi_exec(
    "CREATE TRIGGER IF NOT EXISTS repository.email_trigger1\n"
    "AFTER INSERT ON event BEGIN\n"
    "  INSERT INTO pending_alert(eventid,mtime)\n"
    "    SELECT printf('%%.1c%%d',new.type,new.objid),"
    "           julianday('now') WHERE true\n"
    "    ON CONFLICT(eventId) DO NOTHING;\n"
    "END;"
  );
}








|







101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
** table.
*/
void email_triggers_enable(void){
  if( !db_table_exists("repository","pending_alert") ) return;
  db_multi_exec(
    "CREATE TRIGGER IF NOT EXISTS repository.email_trigger1\n"
    "AFTER INSERT ON event BEGIN\n"
    "  INSERT INTO pending_alert(eventid)\n"
    "    SELECT printf('%%.1c%%d',new.type,new.objid),"
    "           julianday('now') WHERE true\n"
    "    ON CONFLICT(eventId) DO NOTHING;\n"
    "END;"
  );
}