1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-07 01:06:48 +02:00

[ticket/10346] Add drop_tables to perform_schema_changes and add tests

PHPBB3-10346
This commit is contained in:
Nils Adermann
2011-08-29 14:24:50 -04:00
parent 0d41385344
commit 0f2e45800e
2 changed files with 77 additions and 0 deletions

View File

@@ -649,6 +649,23 @@ class phpbb_db_tools
$sqlite = true;
}
// Drop tables?
if (!empty($schema_changes['drop_tables']))
{
foreach ($schema_changes['drop_tables'] as $table)
{
// only drop table if it exists
if ($this->sql_table_exists($table))
{
$result = $this->sql_table_drop($table);
if ($this->return_statements)
{
$statements = array_merge($statements, $result);
}
}
}
}
// Add tables?
if (!empty($schema_changes['add_tables']))
{