Merge pull request #29074 from nextcloud/bug/noid/no-execute-query-in-21

[stable21] executeQuery and executeStatement are 22+
This commit is contained in:
Daniel 2021-10-06 08:42:19 +02:00 committed by GitHub
commit edad2526fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,7 +73,7 @@ class Version1120Date20210917155206 extends SimpleMigrationStep {
$q = $this->getSelectQuery($table);
$u = $this->getUpdateQuery($table);
$r = $q->executeQuery();
$r = $q->execute();
while ($row = $r->fetch()) {
$newId = hash('sha256', $row['owncloud_name'], false);
if ($emitHooks) {
@ -82,7 +82,7 @@ class Version1120Date20210917155206 extends SimpleMigrationStep {
$u->setParameter('uuid', $row['directory_uuid']);
$u->setParameter('newId', $newId);
try {
$u->executeStatement();
$u->execute();
if ($emitHooks) {
$this->emitUnassign($row['owncloud_name'], false);
$this->emitAssign($newId);