Fix migration runner for MySQL DDL implicit commit
This commit is contained in:
@@ -34,13 +34,10 @@ foreach ($files as $file) {
|
||||
throw new RuntimeException("Cannot read {$file}");
|
||||
}
|
||||
|
||||
$pdo->beginTransaction();
|
||||
try {
|
||||
$pdo->exec($sql);
|
||||
$mark->execute(['name' => $name]);
|
||||
$pdo->commit();
|
||||
} catch (Throwable $e) {
|
||||
$pdo->rollBack();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user