From 910cbc5e79c7870cb88e24a6aacd9959bf3f8ae8 Mon Sep 17 00:00:00 2001 From: James Manuel Date: Thu, 26 Feb 2026 10:07:34 +0100 Subject: [PATCH] fix: widen owner_uid and editor_uid columns to support federated cloud IDs When a federated cloud ID exceeds 64 characters, the owner_uid and editor_uid columns in oc_richdocuments_wopi silently truncate the value, which can prevent federated users from opening documents in Collabora. Widen both columns from varchar(64) to varchar(255) to accommodate the full length of federated cloud IDs in the format user@remote.domain. Signed-off-by: James Manuel --- .../Version10100Date20260226000000.php | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 lib/Migration/Version10100Date20260226000000.php diff --git a/lib/Migration/Version10100Date20260226000000.php b/lib/Migration/Version10100Date20260226000000.php new file mode 100644 index 0000000000..6ada5909a5 --- /dev/null +++ b/lib/Migration/Version10100Date20260226000000.php @@ -0,0 +1,42 @@ +hasTable('richdocuments_wopi')) { + $table = $schema->getTable('richdocuments_wopi'); + foreach (['owner_uid', 'editor_uid'] as $columnName) { + if ($table->hasColumn($columnName) && $table->getColumn($columnName)->getLength() < 255) { + $table->changeColumn($columnName, [ + 'length' => 255, + ]); + $changed = true; + } + } + } + + return $changed ? $schema : null; + } +}