From 8c8af37efd8b007893e0df24dddf37dc23ef8787 Mon Sep 17 00:00:00 2001 From: isma91 Date: Mon, 14 Mar 2016 13:43:21 +0100 Subject: [PATCH] adding 6.4.0 sql table --- dist/php/6.4.0.mysql | 21 +++++++++++++++++++++ dist/php/6.4.0.pgsql | 29 +++++++++++++++++++++++++++++ dist/php/6.4.0.sqlite | 25 +++++++++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 dist/php/6.4.0.mysql create mode 100644 dist/php/6.4.0.pgsql create mode 100644 dist/php/6.4.0.sqlite diff --git a/dist/php/6.4.0.mysql b/dist/php/6.4.0.mysql new file mode 100644 index 0000000000..52bb8fec95 --- /dev/null +++ b/dist/php/6.4.0.mysql @@ -0,0 +1,21 @@ +/* SEPARATOR */ +CREATE TABLE IF NOT EXISTS `ajxp_mail_queue` ( + `id` int(11) PRIMARY KEY NOT NULL AUTO_INCREMENT, + `recipent` varchar(255) NOT NULL, + `url` text NOT NULL, + `date_event` int(11) NOT NULL, + `notification_object` longblob NOT NULL, + `html` int(1) NOT NULL +)CHARACTER SET utf8 COLLATE utf8_unicode_ci; +/* SEPARATOR */ +CREATE TABLE IF NOT EXISTS `ajxp_mail_sent` ( + `id` int(11) PRIMARY KEY NOT NULL AUTO_INCREMENT, + `recipent` varchar(255) NOT NULL, + `url` text NOT NULL, + `date_event` int(11) NOT NULL, + `notification_object` longblob NOT NULL, + `html` int(1) NOT NULL +)CHARACTER SET utf8 COLLATE utf8_unicode_ci; +/* SEPARATOR */ +CREATE TRIGGER `mail_queue_go_to_sent` BEFORE DELETE ON `ajxp_mail_queue` +FOR EACH ROW 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); \ No newline at end of file diff --git a/dist/php/6.4.0.pgsql b/dist/php/6.4.0.pgsql new file mode 100644 index 0000000000..d0e24d7b5b --- /dev/null +++ b/dist/php/6.4.0.pgsql @@ -0,0 +1,29 @@ +/* SEPARATOR */ +CREATE TABLE IF NOT EXISTS ajxp_mail_queue ( + id serial PRIMARY KEY, + recipent varchar(255) NOT NULL, + url text NOT NULL, + date_event integer NOT NULL, + notification_object bytea NOT NULL, + html integer NOT NULL +); +/* SEPARATOR */ +CREATE TABLE IF NOT EXISTS ajxp_mail_sent ( + id serial PRIMARY KEY, + recipent varchar(255) NOT NULL, + url text NOT NULL, + date_event integer NOT NULL, + notification_object bytea NOT NULL, + html integer NOT NULL +); +/* SEPARATOR */ +CREATE FUNCTION ajxp_send_mail() RETURNS trigger AS $ajxp_send_mail$ + 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); + RETURN OLD; + END; +$ajxp_send_mail$ LANGUAGE plpgsql; +/* SEPARATOR */ +CREATE TRIGGER mail_queue_go_to_sent BEFORE DELETE ON ajxp_mail_queue +FOR EACH ROW EXECUTE PROCEDURE ajxp_send_mail(); diff --git a/dist/php/6.4.0.sqlite b/dist/php/6.4.0.sqlite new file mode 100644 index 0000000000..15fa90b21d --- /dev/null +++ b/dist/php/6.4.0.sqlite @@ -0,0 +1,25 @@ +/* SEPARATOR */ +CREATE TABLE ajxp_mail_queue ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + recipent TEXT, + url TEXT, + date_event INT, + notification_object blob, + html INT +); +/* SEPARATOR */ +CREATE TABLE ajxp_mail_sent ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + recipent TEXT, + url TEXT, + date_event INT, + notification_object blob, + html INT +); +/* SEPARATOR */ +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;