aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/db_tools.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/db/db_tools.php')
-rw-r--r--phpBB/includes/db/db_tools.php20
1 files changed, 19 insertions, 1 deletions
diff --git a/phpBB/includes/db/db_tools.php b/phpBB/includes/db/db_tools.php
index 7c96965a9b..7715d2e854 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']))
{
@@ -1788,7 +1805,7 @@ class phpbb_db_tools
break;
case 'oracle':
- $statements[] = 'ALTER TABLE ' . $table_name . ' DROP ' . $column_name;
+ $statements[] = 'ALTER TABLE ' . $table_name . ' DROP COLUMN ' . $column_name;
break;
case 'postgres':
@@ -1939,6 +1956,7 @@ class phpbb_db_tools
$statements[] = "DROP SEQUENCE {$row['referenced_name']}";
}
$this->db->sql_freeresult($result);
+ break;
case 'postgres':
// PGSQL does not "tightly" bind sequences and tables, we must guess...