'convert_link_posts', 'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "convert_link_posts CHANGE foreign_id foreign_id VARCHAR(255) NOT NULL DEFAULT '', ADD INDEX local_lookup(ipb_id,type,app), DROP INDEX ipb_id, DROP INDEX `type`, ADD INDEX `type` (`type`), ADD INDEX app (app)" ), array( 'table' => 'convert_link_pms', 'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "convert_link_pms CHANGE foreign_id foreign_id VARCHAR(255) NOT NULL DEFAULT '', ADD INDEX local_lookup(ipb_id,type,app), DROP INDEX ipb_id, DROP INDEX `type`, ADD INDEX `type` (`type`), ADD INDEX app (app)" ), array( 'table' => 'convert_link_topics', 'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "convert_link_topics CHANGE foreign_id foreign_id VARCHAR(255) NOT NULL DEFAULT '', ADD INDEX local_lookup(ipb_id,type,app), DROP INDEX ipb_id, DROP INDEX `type`, ADD INDEX `type` (`type`), ADD INDEX app (app)" ), array( 'table' => 'convert_link', 'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "convert_link CHANGE foreign_id foreign_id VARCHAR(255) NOT NULL DEFAULT '', ADD INDEX local_lookup(ipb_id,type,app), DROP INDEX foreign_id, ADD INDEX foreign_id (foreign_id(250)), DROP INDEX ipb_id, DROP INDEX `type`, ADD INDEX `type` (`type`), ADD INDEX app (app)" ) ) ); if ( count( $toRun ) ) { \IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'convert', 'extra' => array( '_upgradeStep' => 2, '_upgradeData' => 0 ) ) ); /* Queries to run manually */ return array( 'html' => \IPS\Theme::i()->getTemplate( 'forms' )->queries( $toRun, \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr_continue' => 1, 'mr' => \IPS\Request::i()->mr ) ) ) ); } return TRUE; } }