Db\Migration: use query for OPTIMIZE, not exec
This is required as OPTIMIZE returns data
This commit is contained in:
parent
f6c1a9f0f7
commit
193e860beb
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue