Fix migration runner for MySQL DDL implicit commit
This commit is contained in:
parent
883ff30877
commit
aa2f064d08
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user