Permalink
Browse files

MDL-25407 ignore errors in CLI mysql engine conversion script

  • Loading branch information...
1 parent 6e41a68 commit 3b1055ee4c5ea7069efe676cc8862fa514a81c10 @skodak skodak committed Apr 23, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 admin/cli/mysql_engine.php
View
8 admin/cli/mysql_engine.php
@@ -76,7 +76,13 @@
}
echo str_pad($table->name, 40). " - ";
- $DB->change_database_structure("ALTER TABLE {$table->name} ENGINE = $engine");
+ try {
+ $DB->change_database_structure("ALTER TABLE {$table->name} ENGINE = $engine");
+ } catch (moodle_exception $e) {
+ echo $e->getMessage()."\n";
+ $skipped++;
+ continue;
+ }
echo "DONE\n";
$converted++;
}

0 comments on commit 3b1055e

Please sign in to comment.