aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2011-08-29 21:00:13 +0200
committerJoas Schilling <nickvergessen@gmx.de>2011-08-29 21:00:13 +0200
commitee2c8702eae988b12d6d70f980d953795a2f622e (patch)
treeb224bd229cf7151225f596c6a6ec7e15229cbef7 /phpBB/includes/db
parent37a659513e2dcd2b201b8494ea862441099d4b79 (diff)
parent6cde745e280661bcf86a16f95303c9f9b2d1dfe9 (diff)
downloadforums-ee2c8702eae988b12d6d70f980d953795a2f622e.tar
forums-ee2c8702eae988b12d6d70f980d953795a2f622e.tar.gz
forums-ee2c8702eae988b12d6d70f980d953795a2f622e.tar.bz2
forums-ee2c8702eae988b12d6d70f980d953795a2f622e.tar.xz
forums-ee2c8702eae988b12d6d70f980d953795a2f622e.zip
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/10346] Add drop_tables to perform_schema_changes and add tests
Diffstat (limited to 'phpBB/includes/db')
-rw-r--r--phpBB/includes/db/db_tools.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/phpBB/includes/db/db_tools.php b/phpBB/includes/db/db_tools.php
index 7c96965a9b..f1947ab0d3 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']))
{