diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2011-08-29 20:56:06 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2011-08-29 20:56:06 +0200 |
commit | 6cde745e280661bcf86a16f95303c9f9b2d1dfe9 (patch) | |
tree | fbf7126e6e934c454a9d1dddcd4505b520340733 /phpBB/includes/db/db_tools.php | |
parent | 0d41385344e5ccf782197798c663e2d9fc26f8d7 (diff) | |
parent | 0f2e45800e9e88c86bdf335cac6a9974ec8f0385 (diff) | |
download | forums-6cde745e280661bcf86a16f95303c9f9b2d1dfe9.tar forums-6cde745e280661bcf86a16f95303c9f9b2d1dfe9.tar.gz forums-6cde745e280661bcf86a16f95303c9f9b2d1dfe9.tar.bz2 forums-6cde745e280661bcf86a16f95303c9f9b2d1dfe9.tar.xz forums-6cde745e280661bcf86a16f95303c9f9b2d1dfe9.zip |
Merge remote-tracking branch 'remotes/naderman/ticket/10346' into ticket/10346
* remotes/naderman/ticket/10346:
[ticket/10346] Add drop_tables to perform_schema_changes and add tests
Diffstat (limited to 'phpBB/includes/db/db_tools.php')
-rw-r--r-- | phpBB/includes/db/db_tools.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/phpBB/includes/db/db_tools.php b/phpBB/includes/db/db_tools.php index d23323a5b1..2cb0fcef68 100644 --- a/phpBB/includes/db/db_tools.php +++ b/phpBB/includes/db/db_tools.php @@ -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'])) { |