Skip to content

Commit

Permalink
MDL-21116 drop plugin tables in opposite order
Browse files Browse the repository at this point in the history
This should help with foreign key in the future.
  • Loading branch information
skodak committed Dec 22, 2012
1 parent 0dc5a53 commit f092d92
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/ddl/database_manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ public function delete_tables_from_xmldb_file($file) {
}

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);
Expand Down

0 comments on commit f092d92

Please sign in to comment.