From ce9d499173b66a286424eca2fd1c337ea51bd43d Mon Sep 17 00:00:00 2001 From: Vijay Khollam Date: Tue, 22 Oct 2019 11:54:44 +0530 Subject: [PATCH] #51 DB engine Changes (#57) * #00000 feat: DB engine Changes * #00000 feat: DB engine Changes * #00000 feat: DB engine Changes --- .../admin/sql/install.mysql.utf8.sql | 12 +++--------- .../admin/sql/updates/mysql/1.0.5.sql | 8 ++++++++ src/com_tjnotifications/tjnotifications.xml | 7 ++++++- 3 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 src/com_tjnotifications/admin/sql/updates/mysql/1.0.5.sql diff --git a/src/com_tjnotifications/admin/sql/install.mysql.utf8.sql b/src/com_tjnotifications/admin/sql/install.mysql.utf8.sql index b4e5d91e..dfb9b0f7 100644 --- a/src/com_tjnotifications/admin/sql/install.mysql.utf8.sql +++ b/src/com_tjnotifications/admin/sql/install.mysql.utf8.sql @@ -2,10 +2,7 @@ CREATE TABLE IF NOT EXISTS `#__tj_notification_providers` ( `provider` varchar(100) NOT NULL, `state` int(1) NOT NULL, primary key(provider) - ) - AUTO_INCREMENT =0 - DEFAULT CHARSET =utf8; - + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `#__tj_notification_templates` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -35,9 +32,7 @@ CREATE TABLE IF NOT EXISTS `#__tj_notification_templates` ( UNIQUE KEY `client_2` (`client`,`key`), KEY `client` (`client`), KEY `key` (`key`) -) - DEFAULT CHARSET=utf8 - AUTO_INCREMENT=0 ; +) AUTO_INCREMENT=1 ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `#__tj_notification_user_exclusions` ( `user_id` int(11) NOT NULL, @@ -48,5 +43,4 @@ CREATE TABLE IF NOT EXISTS `#__tj_notification_templates` ( KEY `key` (`key`), KEY `provider` (`provider`), CONSTRAINT `#__tj_notification_user_exclusions_ibfk_1` FOREIGN KEY (`provider`) REFERENCES `#__tj_notification_providers` (`provider`) -) - DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; diff --git a/src/com_tjnotifications/admin/sql/updates/mysql/1.0.5.sql b/src/com_tjnotifications/admin/sql/updates/mysql/1.0.5.sql new file mode 100644 index 00000000..8c7f100e --- /dev/null +++ b/src/com_tjnotifications/admin/sql/updates/mysql/1.0.5.sql @@ -0,0 +1,8 @@ + +-- +-- Change table ENGINE; +-- + +ALTER TABLE `#__tj_notification_providers` ENGINE = InnoDB; +ALTER TABLE `#__tj_notification_templates` ENGINE = InnoDB; +ALTER TABLE `#__tj_notification_user_exclusions` ENGINE = InnoDB; diff --git a/src/com_tjnotifications/tjnotifications.xml b/src/com_tjnotifications/tjnotifications.xml index c6cfde57..5f79d4f5 100644 --- a/src/com_tjnotifications/tjnotifications.xml +++ b/src/com_tjnotifications/tjnotifications.xml @@ -7,12 +7,17 @@ Copyright (C) 2016 - 2019 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL 18th Jul 2019 - 1.0.4 + 1.0.5 sql/install.mysql.utf8.sql + + + sql/updates/mysql + + sql/uninstall.mysql.utf8.sql