<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * ExpressionEngine - by EllisLab
 *
 * @package		ExpressionEngine
 * @author		ExpressionEngine Dev Team
 * @copyright	Copyright (c) 2003 - 2011, EllisLab, Inc.
 * @license		http://expressionengine.com/user_guide/license.html
 * @link		http://expressionengine.com
 * @since		Version 2.0
 * @filesource
 */
 
// ------------------------------------------------------------------------

/**
 * ExpressionEngine Update Class
 *
 * @package		ExpressionEngine
 * @subpackage	Core
 * @category	Core
 * @author		ExpressionEngine Dev Team
 * @link		http://expressionengine.com
 */
class Updater {

	function Updater()
	{
		$this->EE =& get_instance();
	}

	function do_update()
	{
		$Q[] = "ALTER TABLE `exp_members` ADD INDEX (`group_id`);";
		$Q[] = "ALTER TABLE `exp_members` ADD INDEX (`unique_id`);";
		$Q[] = "ALTER TABLE `exp_members` ADD INDEX (`password`);";
		$Q[] = "ALTER TABLE `exp_sessions` ADD INDEX (`member_id`);";
		$Q[] = "ALTER TABLE `exp_template_no_access` ADD INDEX (`template_id`);";
		$Q[] = "ALTER TABLE `exp_trackbacks` ADD INDEX (`weblog_id`);";
		
		// pMachine News Feed for Control Panel homepage
		$Q[] = "ALTER TABLE exp_member_homepage ADD `pmachine_news_feed` char(1) NOT NULL default 'l'";
		$Q[] = "ALTER TABLE exp_member_homepage ADD `pmachine_news_feed_order` int(3) NOT NULL default '0'";
		
		// Run the queries
		foreach ($Q as $sql)
		{
			$this->EE->db->query($sql);
		}
		
		return TRUE;
	}
	
}	
// END CLASS



/* End of file ud_151.php */
/* Location: ./system/expressionengine/installer/updates/ud_151.php */