Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ As of Hub 10 / Nextcloud 31, admins must be members of a team to assign that tea
Folder.
]]>
</description>
<version>23.0.0-dev.0</version>
<version>23.0.0-dev.1</version>
<licence>agpl</licence>
<author>Robin Appelman</author>
<namespace>GroupFolders</namespace>
Expand Down
2 changes: 1 addition & 1 deletion lib/Migration/Version102020Date20180806161449.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op
// from Version20000Date20250612140256.php
$table->addColumn('root_id', Types::BIGINT, ['notnull' => false]);
$table->addColumn('storage_id', Types::BIGINT, ['notnull' => false]);
$table->addColumn('options', Types::TEXT, ['notnull' => false]);
$table->addColumn('options', Types::STRING, ['notnull' => false, 'length' => 255]);

$table->setPrimaryKey(['folder_id']);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Migration/Version20001Date20250612140256.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
$table->addColumn('storage_id', Types::BIGINT, ['notnull' => false]);
}
if (!$table->hasColumn('options')) {
$table->addColumn('options', Types::TEXT, ['notnull' => false]);
$table->addColumn('options', Types::STRING, ['notnull' => false, 'length' => 255]);
}
return $schema;
}
Expand Down
42 changes: 42 additions & 0 deletions lib/Migration/Version2300000Date20260702104200.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

declare(strict_types=1);

/**
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCA\GroupFolders\Migration;

use Closure;
use Doctrine\DBAL\Types\Type;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\Attributes\ColumnType;
use OCP\Migration\Attributes\ModifyColumn;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
use Override;

#[ModifyColumn(table: 'group_folders', name: 'options', type: ColumnType::STRING)]
class Version2300000Date20260702104200 extends SimpleMigrationStep {
#[Override]
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();

$table = $schema->getTable('group_folders');
if (!$table->hasColumn('options') || $table->getColumn('options')->getType() !== Type::getType(Types::TEXT)) {

Check failure on line 30 in lib/Migration/Version2300000Date20260702104200.php

View workflow job for this annotation

GitHub Actions / static-phpstan-analysis

Call to static method getType() on an unknown class Doctrine\DBAL\Types\Type.
return null;
}

$table->modifyColumn('options', [
'notnull' => false,
'length' => 255,
'type' => Type::getType(Types::STRING),

Check failure on line 37 in lib/Migration/Version2300000Date20260702104200.php

View workflow job for this annotation

GitHub Actions / static-phpstan-analysis

Call to static method getType() on an unknown class Doctrine\DBAL\Types\Type.
]);

return $schema;
}
}
Loading