summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/Migration
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-03-24 16:17:37 +0100
committerVincent Petry (Rebase PR Action) <PVince81@users.noreply.github.com>2022-03-24 20:35:02 +0000
commitefebbacca4d5a5045271eeecd209c8a0b4253598 (patch)
treee9e7d33b8ca9ec8f9fb5c287e31f317d2c94435e /apps/user_ldap/lib/Migration
parent7dc3eb1e9e9a2cf6b52dc17986b4bbca395f0998 (diff)
downloadnextcloud-server-efebbacca4d5a5045271eeecd209c8a0b4253598.tar.gz
nextcloud-server-efebbacca4d5a5045271eeecd209c8a0b4253598.zip
Add octetLength and charLength to function builder, and tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/user_ldap/lib/Migration')
-rw-r--r--apps/user_ldap/lib/Migration/Version1120Date20210917155206.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/Migration/Version1120Date20210917155206.php b/apps/user_ldap/lib/Migration/Version1120Date20210917155206.php
index 87a8f07fbe1..bca390441d7 100644
--- a/apps/user_ldap/lib/Migration/Version1120Date20210917155206.php
+++ b/apps/user_ldap/lib/Migration/Version1120Date20210917155206.php
@@ -127,10 +127,9 @@ class Version1120Date20210917155206 extends SimpleMigrationStep {
protected function getSelectQuery(string $table): IQueryBuilder {
$qb = $this->dbc->getQueryBuilder();
- $lengthExpr = $this->dbc->getDatabasePlatform()->getLengthExpression('owncloud_name');
$qb->select('owncloud_name', 'directory_uuid')
->from($table)
- ->where($qb->expr()->gt($qb->createFunction($lengthExpr), '64', IQueryBuilder::PARAM_INT));
+ ->where($qb->expr()->gt($qb->func()->octetLength('owncloud_name'), '64', IQueryBuilder::PARAM_INT));
return $qb;
}