From 2391c2d04e04a68b06efebcaf2c6adffeb65acc0 Mon Sep 17 00:00:00 2001 From: Amol Thite Date: Thu, 18 Jul 2019 11:24:22 +0530 Subject: [PATCH] Task #108 chore: Change the charset of tables --- code/admin/sql/install.mysql.utf8.sql | 4 ++-- code/admin/sql/updates/mysql/2.5.1.sql | 5 +++++ code/api.xml | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 code/admin/sql/updates/mysql/2.5.1.sql diff --git a/code/admin/sql/install.mysql.utf8.sql b/code/admin/sql/install.mysql.utf8.sql index a4c9ab0..ec0cc08 100644 --- a/code/admin/sql/install.mysql.utf8.sql +++ b/code/admin/sql/install.mysql.utf8.sql @@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `#__api_keys` ( `last_used` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `per_hour` int(10) NOT NULL, PRIMARY KEY (`id`) -) DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `#__api_logs` ( @@ -22,4 +22,4 @@ CREATE TABLE IF NOT EXISTS `#__api_logs` ( `request` varchar(255) NOT NULL, `post_data` text NOT NULL, PRIMARY KEY (`id`) -) DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; diff --git a/code/admin/sql/updates/mysql/2.5.1.sql b/code/admin/sql/updates/mysql/2.5.1.sql new file mode 100644 index 0000000..8b87338 --- /dev/null +++ b/code/admin/sql/updates/mysql/2.5.1.sql @@ -0,0 +1,5 @@ +ALTER TABLE `#__api_keys` ENGINE = InnoDB; +ALTER TABLE `#__api_logs` ENGINE = InnoDB; + +ALTER TABLE `#__api_keys` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE `#__api_logs` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; diff --git a/code/api.xml b/code/api.xml index 1f93d92..2b62e5f 100644 --- a/code/api.xml +++ b/code/api.xml @@ -7,7 +7,7 @@ Techjoomla extensions@techjoomla.com https://techjoomla.com - 2.5.0 + 2.5.1 Multi-purpose REST API framework for Joomla