$sql = "ALTER TABLE {$table} \n\t\t\t\t\t\tDROP COLUMN " . $field_data[$i]; query($sql, "Couldn't drop field :: " . $field_data[$i] . " from table :: {$table}"); print "<span class=\"ok\"><b>OK</b></span><br />\n"; } } end_step('drop_tables'); case 'drop_tables': $drop_tables = array('access', 'forum_access', 'forum_mods', 'headermetafooter', 'whosonline', $table_prefix . 'old_config'); for ($i = 0; $i < count($drop_tables); $i++) { print " * Dropping table '" . $drop_tables[$i] . "' :: "; flush(); $sql = "DROP TABLE " . $drop_tables[$i]; query($sql, "Couldn't drop table :: " . $drop_tables[$i]); print "<span class=\"ok\"><b>OK</b></span><br />\n"; } end_step('fulltext_search_indexing'); case 'fulltext_search_indexing': // // Generate search word list // // Fetch a batch of posts_text entries // $sql = "SELECT COUNT(*) as total, MAX(post_id) as max_post_id \n\t\t\t\tFROM " . POSTS_TEXT_TABLE; $result = query($sql, "Couldn't get post count totals"); $max_post_id = $db->sql_fetchrow($result); $totalposts = $max_post_id['total']; $max_post_id = $max_post_id['max_post_id']; $per_percent = round($totalposts / 500 * 10); $postcounter = !isset($HTTP_GET_VARS['batchstart']) ? 0 : $HTTP_GET_VARS['batchstart']; $batchsize = 150; // Process this many posts per loop
$sql = "ALTER TABLE " . $table_prefix . "sessions \r\n\t\t\t\t\tTYPE=HEAP"; $db->sql_query($sql); } echo "<span class=\"ok\"><b>OK</b></span><br />\n"; end_step('drop_fields'); case 'drop_fields': $fields = array(BANLIST_TABLE => array("ban_start", "ban_end", "ban_time_type"), FORUMS_TABLE => array("forum_access", "forum_moderator", "forum_type"), PRIVMSGS_TABLE => array("msg_text"), RANKS_TABLE => array("rank_max"), SMILIES_TABLE => array("emotion"), TOPICS_TABLE => array("topic_notify")); while (list($table, $field_data) = each($fields)) { for ($i = 0; $i < count($field_data); $i++) { print " * Drop field '" . $field_data[$i] . "' in '{$table}' :: "; flush(); $sql = "ALTER TABLE {$table} \r\n\t\t\t\t\t\tDROP COLUMN " . $field_data[$i]; query($sql, "Couldn't drop field :: " . $field_data[$i] . " from table :: {$table}"); print "<span class=\"ok\"><b>OK</b></span><br />\n"; } } end_step('drop_tables'); case 'drop_tables': $drop_tables = array('access', 'forum_access', 'forum_mods', 'headermetafooter', 'whosonline', $table_prefix . 'old_config'); for ($i = 0; $i < count($drop_tables); $i++) { print " * Dropping table '" . $drop_tables[$i] . "' :: "; flush(); $sql = "DROP TABLE " . $drop_tables[$i]; query($sql, "Couldn't drop table :: " . $drop_tables[$i]); print "<span class=\"ok\"><b>OK</b></span><br />\n"; } echo "\n<br /><br />\n\n<font size=\"+3\"><b>UPGRADE COMPLETED</b></font><br />\n"; } } print "<br />If the upgrade completed without error you may click <a href=\"index.{$phpEx}\">Here</a> to proceed to the index<br />"; common_footer();