diff options
Diffstat (limited to 'phpBB/develop/mysql_upgrader.php')
| -rw-r--r-- | phpBB/develop/mysql_upgrader.php | 27 | 
1 files changed, 20 insertions, 7 deletions
| diff --git a/phpBB/develop/mysql_upgrader.php b/phpBB/develop/mysql_upgrader.php index eb34034826..276c010e84 100644 --- a/phpBB/develop/mysql_upgrader.php +++ b/phpBB/develop/mysql_upgrader.php @@ -1,14 +1,20 @@  <?php  /**  * -* @package phpBB3 -* @copyright (c) 2006 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package.  * -* This file creates SQL statements to upgrade phpBB on MySQL 3.x/4.0.x to 4.1.x/5.x +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file.  *  */ +/** +* This file creates SQL statements to upgrade phpBB on MySQL 3.x/4.0.x to 4.1.x/5.x +*/ +  //  // Security message:  // @@ -56,10 +62,17 @@ echo "USE $dbname;$newline$newline";  @set_time_limit(0); -require($phpbb_root_path . 'includes/db/schema_data.' . $phpEx); -require($phpbb_root_path . 'phpbb/db/tools.' . $phpEx); +$finder = new \phpbb\finder(new \phpbb\filesystem\filesystem(), $phpbb_root_path); +$classes = $finder->core_path('phpbb/') +	->directory('/db/migration/data') +	->get_classes(); + +$factory = new \phpbb\db\tools\factory(); +$db_tools = $factory->get($db, true); -$dbms_type_map = phpbb\db\tools::get_dbms_type_map(); +$schema_generator = new \phpbb\db\migration\schema_generator($classes, $config, $db, $db_tools, $phpbb_root_path, $phpEx, $table_prefix); +$schema_data = $schema_generator->get_schema(); +$dbms_type_map = \phpbb\db\tools\tools::get_dbms_type_map();  foreach ($schema_data as $table_name => $table_data)  { | 
