Merge pull request #47839 from nextcloud/backport/47640/stable30

[stable30] fix: Run migration sql as statement so that the primary db node is used
This commit is contained in:
Joas Schilling 2024-09-10 16:19:32 +02:00 committed by GitHub
commit 5017d5000e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -139,7 +139,7 @@ class Migrator {
$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();