From d0e3ffed1628c96670d957863711512f942bb8af Mon Sep 17 00:00:00 2001 From: isma91 Date: Tue, 8 Mar 2016 09:59:29 +0100 Subject: [PATCH] [core.mailer]Adding the SQLite create file for the database --- core/src/plugins/core.mailer/create.sqlite | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 core/src/plugins/core.mailer/create.sqlite diff --git a/core/src/plugins/core.mailer/create.sqlite b/core/src/plugins/core.mailer/create.sqlite new file mode 100644 index 0000000000..adeb2d5a54 --- /dev/null +++ b/core/src/plugins/core.mailer/create.sqlite @@ -0,0 +1,24 @@ +CREATE TABLE ajxp_mail_queue ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + recipent TEXT, + url TEXT, + date_event INT, + notification_object blob, + html INT +); + +CREATE TABLE ajxp_mail_sent ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + recipent TEXT, + url TEXT, + date_event INT, + notification_object blob, + html INT +); + +CREATE TRIGGER mail_queue_go_to_sent BEFORE DELETE ON ajxp_mail_queue +FOR EACH ROW + BEGIN + INSERT INTO ajxp_mail_sent (id,recipent,url,date_event,notification_object,html) + VALUES (old.id,old.recipent,old.url,old.date_event,old.notification_object,old.html); + END; \ No newline at end of file