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>
This commit is contained in:
Arthur Schiwon 2022-03-23 15:28:58 +01:00 committed by Côme Chilliet
parent d675e52350
commit 65cd09face
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A
3 changed files with 6 additions and 6 deletions

View file

@ -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, [

View file

@ -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, [

View file

@ -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, [