Skip to content
Merged
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 lib/Migration/Version2060Date20200302131958.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
]);
$table->addColumn('guest_displayname', 'string', [
'notnull' => false,
'length' => 64,
'length' => 255,
]);
$table->addColumn('fileid', 'bigint', [
'notnull' => true,
Expand Down
39 changes: 39 additions & 0 deletions lib/Migration/Version9000Date20250128212050.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

declare(strict_types=1);

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

namespace OCA\Richdocuments\Migration;

use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

class Version9000Date20250128212050 extends SimpleMigrationStep {

public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
if (!$schema->hasTable('richdocuments_wopi')) {
return null;
}

$table = $schema->getTable('richdocuments_wopi');
if (!$table->hasColumn('guest_displayname')) {
return null;
}

$column = $table->getColumn('guest_displayname');
if ($column->getLength() === 255) {
return null;
}

$column->setLength(255);
return $schema;
}
}
Loading