diff options
Diffstat (limited to 'lib/Migration/Version7000Date20190724121136.php')
-rw-r--r-- | lib/Migration/Version7000Date20190724121136.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Migration/Version7000Date20190724121136.php b/lib/Migration/Version7000Date20190724121136.php index 20de3a34d..5c3311515 100644 --- a/lib/Migration/Version7000Date20190724121136.php +++ b/lib/Migration/Version7000Date20190724121136.php @@ -96,12 +96,12 @@ class Version7000Date20190724121136 extends SimpleMigrationStep { ->where($update->expr()->eq('user_id', $update->createParameter('user_id'))) ->andWhere($update->expr()->eq('room_id', $update->createParameter('room_id'))); - $result = $query->execute(); + $result = $query->executeQuery(); while ($row = $result->fetch()) { $update->setParameter('message_id', (int) $row['last_comment'], IQueryBuilder::PARAM_INT) ->setParameter('user_id', $row['user_id']) ->setParameter('room_id', (int) $row['object_id'], IQueryBuilder::PARAM_INT); - $update->execute(); + $update->executeStatement(); } $result->closeCursor(); @@ -110,11 +110,11 @@ class Version7000Date20190724121136 extends SimpleMigrationStep { * as the comment was posted (author only), we set the read marker to -1 * for all users and in case of -1 we calculate the marker on the next request. */ - $default = $this->connection->getQueryBuilder(); - $default->update('talk_participants') - ->set('last_read_message', $default->createNamedParameter(-1)) - ->where($default->expr()->isNotNull('user_id')) - ->andWhere($default->expr()->eq('last_read_message', $default->createNamedParameter(0))); - $default->execute(); + $update = $this->connection->getQueryBuilder(); + $update->update('talk_participants') + ->set('last_read_message', $update->createNamedParameter(-1)) + ->where($update->expr()->isNotNull('user_id')) + ->andWhere($update->expr()->eq('last_read_message', $update->createNamedParameter(0))); + $update->executeStatement(); } } |