$row = $db->sql_fetchrow($result); $db->sql_freeresult($result); $mysql_indexer = $drop_index = false; if (strtolower($row['Type']) === 'mediumtext') { $mysql_indexer = true; } if (strtolower($row['Key']) === 'mul') { $drop_index = true; } echo "USE {$dbname};{$newline}{$newline}"; @set_time_limit(0); $finder = new \phpbb\finder(new \phpbb\filesystem(), $phpbb_root_path); $classes = $finder->core_path('phpbb/')->directory('/db/migration/data')->get_classes(); $schema_generator = new \phpbb\db\migration\schema_generator($classes, $config, $db, new \phpbb\db\tools($db, true), $phpbb_root_path, $phpEx, $table_prefix); $schema_data = $schema_generator->get_schema(); $dbms_type_map = \phpbb\db\tools::get_dbms_type_map(); foreach ($schema_data as $table_name => $table_data) { $table_name = str_replace('phpbb_', $prefix, $table_name); // Write comment about table echo "# Table: '{$table_name}'{$newline}"; // Create Table statement $generator = $textimage = false; // Do we need to DROP a fulltext index before we alter the table? if ($table_name == $prefix . 'posts' && $drop_index) { echo "ALTER TABLE {$table_name}{$newline}"; echo "DROP INDEX post_text,{$newline}DROP INDEX post_subject,{$newline}DROP INDEX post_content;{$newline}{$newline}"; } $line = "ALTER TABLE {$table_name} {$newline}"; // Table specific so we don't get overlap $modded_array = array(); // Write columns one by one...