Skip to content

Commit

Permalink
merge conflicts thanks @wilsonge
Browse files Browse the repository at this point in the history
  • Loading branch information
zero-24 committed Nov 10, 2015
2 parents fd9732b + c6cb680 commit 7f252f6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
5 changes: 2 additions & 3 deletions administrator/components/com_installer/models/database.php
Expand Up @@ -168,7 +168,6 @@ public function fixSchemaVersion($changeSet)
*
* @return mixed version if successful, false if fail.
*/

public function getUpdateVersion()
{
$table = JTable::getInstance('Extension');
Expand Down Expand Up @@ -270,15 +269,15 @@ public function convertTablesToUtf8mb4()
// Get the SQL file to convert the core tables. Yes, this is hardcoded because we have all sorts of index
// conversions and funky things we can't automate in core tables without an actual SQL file.
$serverType = $db->getServerType();
$fileName = JPATH_ADMINISTRATOR . "/components/com_admin/sql/updates/$serverType/3.5.0-2015-07-01.sql";
$fileName = JPATH_ADMINISTRATOR . "/components/com_admin/sql/updates/$serverType/3.5.0-2015-07-01.sql";

if (!is_file($fileName))
{
return;
}

$fileContents = @file_get_contents($fileName);
$queries = $db->splitSql($fileContents);
$queries = $db->splitSql($fileContents);

if (empty($queries))
{
Expand Down
16 changes: 8 additions & 8 deletions installation/sql/mysql/joomla.sql
Expand Up @@ -108,7 +108,7 @@ CREATE TABLE IF NOT EXISTS `#__banners` (
`cid` int(11) NOT NULL DEFAULT 0,
`type` int(11) NOT NULL DEFAULT 0,
`name` varchar(255) NOT NULL DEFAULT '',
`alias` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`alias` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`imptotal` int(11) NOT NULL DEFAULT 0,
`impmade` int(11) NOT NULL DEFAULT 0,
`clicks` int(11) NOT NULL DEFAULT 0,
Expand Down Expand Up @@ -205,7 +205,7 @@ CREATE TABLE IF NOT EXISTS `#__categories` (
`path` varchar(255) NOT NULL DEFAULT '',
`extension` varchar(50) NOT NULL DEFAULT '',
`title` varchar(255) NOT NULL,
`alias` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`alias` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`note` varchar(255) NOT NULL DEFAULT '',
`description` mediumtext NOT NULL,
`published` tinyint(1) NOT NULL DEFAULT 0,
Expand Down Expand Up @@ -254,7 +254,7 @@ INSERT INTO `#__categories` (`id`, `asset_id`, `parent_id`, `lft`, `rgt`, `level
CREATE TABLE IF NOT EXISTS `#__contact_details` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '',
`alias` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`alias` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`con_position` varchar(255) DEFAULT NULL,
`address` text,
`suburb` varchar(100) DEFAULT NULL,
Expand Down Expand Up @@ -316,7 +316,7 @@ CREATE TABLE IF NOT EXISTS `#__content` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`asset_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',
`title` varchar(255) NOT NULL DEFAULT '',
`alias` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`alias` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`introtext` mediumtext NOT NULL,
`fulltext` mediumtext NOT NULL,
`state` tinyint(3) NOT NULL DEFAULT 0,
Expand Down Expand Up @@ -1216,7 +1216,7 @@ CREATE TABLE IF NOT EXISTS `#__menu` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`menutype` varchar(24) NOT NULL COMMENT 'The type of menu this item belongs to. FK to #__menu_types.menutype',
`title` varchar(255) NOT NULL COMMENT 'The display title of the menu item.',
`alias` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'The SEF alias of the menu item.',
`alias` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'The SEF alias of the menu item.',
`note` varchar(255) NOT NULL DEFAULT '',
`path` varchar(1024) NOT NULL COMMENT 'The computed path of the menu item based on the alias field.',
`link` varchar(1024) NOT NULL COMMENT 'The actually link the menu item refers to.',
Expand Down Expand Up @@ -1426,7 +1426,7 @@ CREATE TABLE IF NOT EXISTS `#__newsfeeds` (
`catid` int(11) NOT NULL DEFAULT 0,
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL DEFAULT '',
`alias` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`alias` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`link` varchar(200) NOT NULL DEFAULT '',
`published` tinyint(1) NOT NULL DEFAULT 0,
`numarticles` int(10) unsigned NOT NULL DEFAULT 1,
Expand Down Expand Up @@ -1577,7 +1577,7 @@ CREATE TABLE IF NOT EXISTS `#__tags` (
`level` int(10) unsigned NOT NULL DEFAULT 0,
`path` varchar(255) NOT NULL DEFAULT '',
`title` varchar(255) NOT NULL,
`alias` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`alias` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`note` varchar(255) NOT NULL DEFAULT '',
`description` mediumtext NOT NULL,
`published` tinyint(1) NOT NULL DEFAULT 0,
Expand Down Expand Up @@ -1672,7 +1672,7 @@ CREATE TABLE IF NOT EXISTS `#__ucm_content` (
`core_content_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`core_type_alias` varchar(255) NOT NULL DEFAULT '' COMMENT 'FK to the content types table',
`core_title` varchar(255) NOT NULL,
`core_alias` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`core_alias` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`core_body` mediumtext NOT NULL,
`core_state` tinyint(1) NOT NULL DEFAULT 0,
`core_checked_out_time` varchar(255) NOT NULL DEFAULT '',
Expand Down
3 changes: 2 additions & 1 deletion libraries/cms/schema/changeitem.php
Expand Up @@ -240,7 +240,8 @@ public function fix()
if ($this->checkStatus === -2)
{
// At this point we have a failed query
$this->db->setQuery($this->updateQuery);
$query = $this->db->convertUtf8mb4QueryToUtf8($this->updateQuery);
$this->db->setQuery($query);

if ($this->db->execute())
{
Expand Down

0 comments on commit 7f252f6

Please sign in to comment.