Skip to content

Commit

Permalink
Remove obsolete database change
Browse files Browse the repository at this point in the history
  • Loading branch information
roland-d committed Nov 21, 2015
1 parent ada9d0d commit e7ba512
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 64 deletions.
65 changes: 1 addition & 64 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function update($installer)

$this->deleteUnexistingFiles();
$this->updateManifestCaches();
$this->updateDatabase();
$this->uninstallEosPlugin();
$this->clearRadCache();
$this->updateAssets();
$this->clearStatsCache();
Expand Down Expand Up @@ -97,69 +97,6 @@ protected function clearStatsCache()
}
}

/**
* Method to update Database
*
* @return void
*/
protected function updateDatabase()
{
$db = JFactory::getDbo();

if (strpos($db->name, 'mysql') !== false)
{
$this->updateDatabaseMysql();
}

$this->uninstallEosPlugin();
}

/**
* Method to update MySQL Database
*
* @return void
*/
protected function updateDatabaseMysql()
{
$db = JFactory::getDbo();

$db->setQuery('SHOW ENGINES');

try
{
$results = $db->loadObjectList();
}
catch (Exception $e)
{
echo JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()) . '<br />';

return;
}

foreach ($results as $result)
{
if ($result->Support != 'DEFAULT')
{
continue;
}

$db->setQuery('ALTER TABLE #__update_sites_extensions ENGINE = ' . $result->Engine);

try
{
$db->execute();
}
catch (Exception $e)
{
echo JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()) . '<br />';

return;
}

break;
}
}

/**
* Uninstall the 2.5 EOS plugin
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ ALTER TABLE `#__menu` DROP KEY `idx_path`, ADD KEY `idx_path` (`path`(191));
ALTER TABLE `#__session` MODIFY `session_id` varchar(191) NOT NULL DEFAULT '';

ALTER TABLE `#__user_keys` MODIFY `series` varchar(191) NOT NULL;

ALTER TABLE `#__update_sites_extensions` ENGINE='DEFAULT';

0 comments on commit e7ba512

Please sign in to comment.