Skip to content

Commit

Permalink
fix: Run migration sql as statement so that the primary db node is used
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr authored and backportbot[bot] committed Sep 9, 2024
1 parent 8f6620d commit 332b7a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/DB/Migrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ protected function applySchema(Schema $targetSchema, ?Connection $connection = n
$step = 0;
foreach ($sqls as $sql) {
$this->emit($sql, $step++, count($sqls));
$connection->executeQuery($sql);
$connection->executeStatement($sql);
}
if (!$connection->getDatabasePlatform() instanceof MySQLPlatform) {
$connection->commit();
Expand Down

0 comments on commit 332b7a4

Please sign in to comment.