diff options
author | Marc Alexander <admin@m-a-styles.de> | 2020-01-01 16:17:23 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2020-01-01 16:17:23 +0100 |
commit | 2b65ce123cec682a7b1b6037c93259bc5abccb44 (patch) | |
tree | ee453146d5aef42038ab20d2e1e84dacab4c492f /phpBB/develop | |
parent | [ticket/16284] Add effectively installed checks where applicable (diff) | |
download | phpbb-2b65ce123cec682a7b1b6037c93259bc5abccb44.tar.gz phpbb-2b65ce123cec682a7b1b6037c93259bc5abccb44.tar.bz2 phpbb-2b65ce123cec682a7b1b6037c93259bc5abccb44.zip |
[ticket/16284] Adjust create schema and add tables to tests
PHPBB3-16284
Diffstat (limited to 'phpBB/develop')
-rw-r--r-- | phpBB/develop/create_schema_files.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php index fe2b2154a5..311b2fc94a 100644 --- a/phpBB/develop/create_schema_files.php +++ b/phpBB/develop/create_schema_files.php @@ -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'); |