diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2016-02-04 23:35:19 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2016-02-05 15:36:21 +0100 |
commit | 9d2c433b2466ecd6a012d4103c0637ea0136139b (patch) | |
tree | 6dd563ae70753d4319ecae1b59def286eb1cfb70 /apps/files/lib | |
parent | d537cae06345af37857b20a1a315229881e1c6c7 (diff) | |
download | nextcloud-server-9d2c433b2466ecd6a012d4103c0637ea0136139b.tar.gz nextcloud-server-9d2c433b2466ecd6a012d4103c0637ea0136139b.zip |
fix pgsql
Diffstat (limited to 'apps/files/lib')
-rw-r--r-- | apps/files/lib/backgroundjob/deleteorphaneditems.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files/lib/backgroundjob/deleteorphaneditems.php b/apps/files/lib/backgroundjob/deleteorphaneditems.php index 37c05ce214f..dc9f781e403 100644 --- a/apps/files/lib/backgroundjob/deleteorphaneditems.php +++ b/apps/files/lib/backgroundjob/deleteorphaneditems.php @@ -110,7 +110,8 @@ class DeleteOrphanedItems extends TimedJob { * @return int Number of deleted entries */ protected function cleanComments() { - $deletedEntries = $this->cleanUp('comments', 'object_id', 'object_type'); + $qb = $this->connection->getQueryBuilder(); + $deletedEntries = $this->cleanUp('comments', $qb->createFunction('CAST(`object_id` as INT)'), 'object_type'); $this->logger->debug("$deletedEntries orphaned comments deleted", ['app' => 'DeleteOrphanedItems']); return $deletedEntries; } @@ -121,7 +122,8 @@ class DeleteOrphanedItems extends TimedJob { * @return int Number of deleted entries */ protected function cleanCommentMarkers() { - $deletedEntries = $this->cleanUp('comments_read_markers', 'object_id', 'object_type'); + $qb = $this->connection->getQueryBuilder(); + $deletedEntries = $this->cleanUp('comments_read_markers', $qb->createFunction('CAST(`object_id` as INT)'), 'object_type'); $this->logger->debug("$deletedEntries orphaned comment read marks deleted", ['app' => 'DeleteOrphanedItems']); return $deletedEntries; } |