Changing collation to utf8mb4 (#226)

* Changing collation to utf8mb4

* Increased Joomla version requirement
This commit is contained in:
Yves Hoppe 2016-07-27 21:37:46 +02:00 committed by Chris Davenport
parent 93f8892458
commit 00ddf5b2e6
8 changed files with 33 additions and 8 deletions

View File

@ -11,6 +11,6 @@
<downloads>
<downloadurl type="full" format="zip">https://github.com/joomla-extensions/weblinks/releases/download/3.5.0/pkg-weblinks-3.5.0.zip</downloadurl>
</downloads>
<targetplatform name="joomla" version="3.[456789]" />
<targetplatform name="joomla" version="3.[56789]" />
</update>
</updates>

View File

@ -14,7 +14,7 @@ CREATE TABLE IF NOT EXISTS `#__weblinks` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`catid` int(11) NOT NULL DEFAULT 0,
`title` varchar(250) NOT NULL DEFAULT '',
`alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`alias` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`url` varchar(250) NOT NULL DEFAULT '',
`description` text NOT NULL,
`hits` int(11) NOT NULL DEFAULT 0,
@ -48,4 +48,4 @@ CREATE TABLE IF NOT EXISTS `#__weblinks` (
KEY `idx_featured_catid` (`featured`,`catid`),
KEY `idx_language` (`language`),
KEY `idx_xreference` (`xreference`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

View File

@ -0,0 +1,25 @@
# Conversion to utf8mb4
--
-- Step 1.1: Enlarge columns to avoid data loss on later conversion to utf8mb4
--
ALTER TABLE `#__weblinks` MODIFY `alias` varchar(400) NOT NULL DEFAULT '';
--
-- Step 1.2: Convert table to utf8mb4 chracter set with utf8mb4_unicode_ci collation
--
ALTER TABLE `#__weblinks` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
--
-- Step 1.3: Set collation to utf8mb4_bin for formerly utf8_bin collated columns
--
ALTER TABLE `#__weblinks` MODIFY `alias` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '';
--
-- Step 1.4: Set default character set and collation for all tables
--
ALTER TABLE `#__weblinks` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.1" method="upgrade">
<extension type="component" version="3.5" method="upgrade">
<name>com_weblinks</name>
<author>Joomla! Project</author>
<creationDate>##DATE##</creationDate>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="module" version="3.1" client="site" method="upgrade">
<extension type="module" version="3.5" client="site" method="upgrade">
<name>mod_weblinks</name>
<author>Joomla! Project</author>
<creationDate>##DATE##</creationDate>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<extension type="package" version="3.0" method="upgrade">
<extension type="package" version="3.5" method="upgrade">
<name>pkg_weblinks</name>
<packagename>weblinks</packagename>
<creationDate>December 2012</creationDate>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="finder" method="upgrade">
<extension version="3.5" type="plugin" group="finder" method="upgrade">
<name>plg_finder_weblinks</name>
<author>Joomla! Project</author>
<creationDate>##DATE##</creationDate>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="search" method="upgrade">
<extension version="3.5" type="plugin" group="search" method="upgrade">
<name>plg_search_weblinks</name>
<author>Joomla! Project</author>
<creationDate>##DATE##</creationDate>