summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2016-06-03 14:43:31 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2016-06-10 12:44:49 +0200
commit28d9ad2817b744bcef35a9259f65eb56b0b2ae78 (patch)
tree421012483df36505e0df58ee9bf0a7dfbc43fc5b /lib
parent60225284f3b8ef947f67bbe168b12dca867d6f3d (diff)
downloadnextcloud-server-28d9ad2817b744bcef35a9259f65eb56b0b2ae78.tar.gz
nextcloud-server-28d9ad2817b744bcef35a9259f65eb56b0b2ae78.zip
Empty string is null on oracle
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Repair/AvatarPermissions.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/Repair/AvatarPermissions.php b/lib/private/Repair/AvatarPermissions.php
index 1d96a79ac1f..d23479f5ba8 100644
--- a/lib/private/Repair/AvatarPermissions.php
+++ b/lib/private/Repair/AvatarPermissions.php
@@ -20,6 +20,7 @@
*/
namespace OC\Repair;
+use Doctrine\DBAL\Platforms\OraclePlatform;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
use OCP\Migration\IRepairStep;
@@ -71,9 +72,16 @@ class AvatarPermissions implements IRepairStep {
->from('storages')
->where($qb->expr()->like('id', $qb2->createParameter('like')));
+ if ($this->connection->getDatabasePlatform() instanceof OraclePlatform) {
+ // '' is null on oracle
+ $path = $qb2->expr()->isNull('path');
+ } else {
+ $path = $qb2->expr()->eq('path', $qb2->createNamedParameter(''));
+ }
+
$qb2->update('filecache')
->set('permissions', $qb2->createNamedParameter(23))
- ->where($qb2->expr()->eq('path', $qb2->createNamedParameter('')))
+ ->where($path)
->andWhere($qb2->expr()->in('storage', $qb2->createFunction($qb->getSQL())))
->andWhere($qb2->expr()->neq('permissions', $qb2->createNamedParameter(23)))
->setParameter('like', 'home::%');