summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-09-15 22:09:01 +0200
committerGitHub <noreply@github.com>2024-09-15 22:09:01 +0200
commit6bc75b85f1bf5839a7dc85321d9ddb22dd3c1086 (patch)
treef69890d56066e4087a986f7f618ff76995181214 /core
parent97aa0f70871524d83653aa4003806efedec86629 (diff)
parent2853496dbb4dab38a3a02b90a72f14d343566830 (diff)
downloadnextcloud-server-6bc75b85f1bf5839a7dc85321d9ddb22dd3c1086.tar.gz
nextcloud-server-6bc75b85f1bf5839a7dc85321d9ddb22dd3c1086.zip
Merge pull request #47804 from nextcloud/backport/47801/stable30
Diffstat (limited to 'core')
-rw-r--r--core/Migrations/Version30000Date20240906095113.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/core/Migrations/Version30000Date20240906095113.php b/core/Migrations/Version30000Date20240906095113.php
new file mode 100644
index 00000000000..4991aecb078
--- /dev/null
+++ b/core/Migrations/Version30000Date20240906095113.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace OC\Core\Migrations;
+
+use Closure;
+use OCP\DB\ISchemaWrapper;
+use OCP\Migration\Attributes\ModifyColumn;
+use OCP\Migration\IOutput;
+use OCP\Migration\SimpleMigrationStep;
+
+#[ModifyColumn(table: 'taskprocessing_tasks', name: 'error_message', description: 'Increase column length to 4000 bytes to support longer error messages')]
+class Version30000Date20240906095113 extends SimpleMigrationStep {
+
+ /**
+ * @param IOutput $output
+ * @param Closure(): ISchemaWrapper $schemaClosure
+ * @param array $options
+ * @return null|ISchemaWrapper
+ */
+ public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
+ /** @var ISchemaWrapper $schema */
+ $schema = $schemaClosure();
+
+ $table = $schema->getTable('taskprocessing_tasks');
+ $column = $table->getColumn('error_message');
+
+ if ($column->getLength() < 4000) {
+ $column->setLength(4000);
+ }
+
+ return $schema;
+ }
+}