summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/Migration
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2022-03-23 15:28:58 +0100
committerCôme Chilliet (Rebase PR Action) <come-nc@users.noreply.github.com>2022-03-30 14:43:08 +0000
commit2f49f4a0fe186790173f0bad1f14760b57e6d7f6 (patch)
tree3e95850c98722cb5a49cac5dbcf0eb8be5315258 /apps/user_ldap/lib/Migration
parentf528c5416cea24fc8965d564508d267d713c165e (diff)
downloadnextcloud-server-2f49f4a0fe186790173f0bad1f14760b57e6d7f6.tar.gz
nextcloud-server-2f49f4a0fe186790173f0bad1f14760b57e6d7f6.zip
limit ldap_dn columns to 4000
- enlarging string cols from 255 to more than 4000 fails on default Oracle installations for invalid datatype conversion Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap/lib/Migration')
-rw-r--r--apps/user_ldap/lib/Migration/Version1010Date20200630192842.php4
-rw-r--r--apps/user_ldap/lib/Migration/Version1130Date20211102154716.php6
-rw-r--r--apps/user_ldap/lib/Migration/Version1130Date20220110154718.php2
3 files changed, 6 insertions, 6 deletions
diff --git a/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php b/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php
index 939db69a6ab..5c7dc7db95c 100644
--- a/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php
+++ b/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php
@@ -47,7 +47,7 @@ class Version1010Date20200630192842 extends SimpleMigrationStep {
$table = $schema->createTable('ldap_user_mapping');
$table->addColumn('ldap_dn', Types::STRING, [
'notnull' => true,
- 'length' => 255,
+ 'length' => 4000,
'default' => '',
]);
$table->addColumn('owncloud_name', Types::STRING, [
@@ -73,7 +73,7 @@ class Version1010Date20200630192842 extends SimpleMigrationStep {
$table = $schema->createTable('ldap_group_mapping');
$table->addColumn('ldap_dn', Types::STRING, [
'notnull' => true,
- 'length' => 255,
+ 'length' => 4000,
'default' => '',
]);
$table->addColumn('owncloud_name', Types::STRING, [
diff --git a/apps/user_ldap/lib/Migration/Version1130Date20211102154716.php b/apps/user_ldap/lib/Migration/Version1130Date20211102154716.php
index 024c5801582..5c5ed44c899 100644
--- a/apps/user_ldap/lib/Migration/Version1130Date20211102154716.php
+++ b/apps/user_ldap/lib/Migration/Version1130Date20211102154716.php
@@ -95,8 +95,8 @@ class Version1130Date20211102154716 extends SimpleMigrationStep {
}
$column = $table->getColumn('ldap_dn');
if ($tableName === 'ldap_user_mapping') {
- if ($column->getLength() < 4096) {
- $column->setLength(4096);
+ if ($column->getLength() < 4000) {
+ $column->setLength(4000);
$changeSchema = true;
}
@@ -117,7 +117,7 @@ class Version1130Date20211102154716 extends SimpleMigrationStep {
$table2 = $schema->createTable('ldap_group_mapping_backup');
$table2->addColumn('ldap_dn', Types::STRING, [
'notnull' => true,
- 'length' => 4096,
+ 'length' => 4000,
'default' => '',
]);
$table2->addColumn('owncloud_name', Types::STRING, [
diff --git a/apps/user_ldap/lib/Migration/Version1130Date20220110154718.php b/apps/user_ldap/lib/Migration/Version1130Date20220110154718.php
index 5f146ab06a5..74dd2d873bc 100644
--- a/apps/user_ldap/lib/Migration/Version1130Date20220110154718.php
+++ b/apps/user_ldap/lib/Migration/Version1130Date20220110154718.php
@@ -54,7 +54,7 @@ class Version1130Date20220110154718 extends GroupMappingMigration {
$table = $schema->createTable('ldap_group_mapping');
$table->addColumn('ldap_dn', Types::STRING, [
'notnull' => true,
- 'length' => 4096,
+ 'length' => 4000,
'default' => '',
]);
$table->addColumn('owncloud_name', Types::STRING, [