mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/16284] Adjust create schema and add tables to tests
PHPBB3-16284
This commit is contained in:
@@ -52,7 +52,15 @@ $db = new \phpbb\db\driver\sqlite3();
|
||||
$factory = new \phpbb\db\tools\factory();
|
||||
$db_tools = $factory->get($db, true);
|
||||
|
||||
$schema_generator = new \phpbb\db\migration\schema_generator($classes, new \phpbb\config\config(array()), $db, $db_tools, $phpbb_root_path, $phpEx, $table_prefix);
|
||||
$tables_data = \Symfony\Component\Yaml\Yaml::parseFile($phpbb_root_path . '/config/default/container/tables.yml');
|
||||
$tables = [];
|
||||
|
||||
foreach ($tables_data['parameters'] as $parameter => $table)
|
||||
{
|
||||
$tables[str_replace('tables.', '', $parameter)] = str_replace('%core.table_prefix%', $table_prefix, $table);
|
||||
}
|
||||
|
||||
$schema_generator = new \phpbb\db\migration\schema_generator($classes, new \phpbb\config\config(array()), $db, $db_tools, $phpbb_root_path, $phpEx, $table_prefix, $tables);
|
||||
$schema_data = $schema_generator->get_schema();
|
||||
|
||||
$fp = fopen($schema_path . 'schema.json', 'wb');
|
||||
|
Reference in New Issue
Block a user