MDL-21116 drop plugin tables in opposite order

This should help with foreign key in the future.
This commit is contained in:
Petr Škoda
2012-12-22 19:01:00 +01:00
parent 0dc5a532ec
commit f092d92004
+2
View File
@@ -300,6 +300,8 @@ class database_manager {
}
if ($xmldb_tables = $structure->getTables()) {
// Delete in opposite order, this should help with foreign keys in the future.
$xmldb_tables = array_reverse($xmldb_tables);
foreach($xmldb_tables as $table) {
if ($this->table_exists($table)) {
$this->drop_table($table);