Db\Migration: use query for OPTIMIZE, not exec

This is required as OPTIMIZE returns data
This commit is contained in:
Thomas Gelf 2016-07-26 13:43:18 +02:00
parent f6c1a9f0f7
commit 193e860beb
1 changed files with 5 additions and 1 deletions

View File

@ -40,7 +40,11 @@ class Migration
try {
foreach ($queries as $query) {
$db->exec($query);
if (preg_match('/^OPTIMIZE /i', $query)) {
$db->query($query);
} else {
$db->exec($query);
}
}
} catch (Exception $e) {