From 920afcc8a3893e9b4d34786c92f3296882740a69 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Philipp=20Sch=C3=BCttl=C3=B6ffel?=
 <schuettloeffel@zqs.uni-hannover.de>
Date: Wed, 28 Jun 2023 13:02:30 +0000
Subject: [PATCH] Resolve "Mailqueue kaputt"

Closes #1134

Merge request studip/studip!1886
---
 db/migrations/5.1.49_enlarge_mailqueue.php | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 db/migrations/5.1.49_enlarge_mailqueue.php

diff --git a/db/migrations/5.1.49_enlarge_mailqueue.php b/db/migrations/5.1.49_enlarge_mailqueue.php
new file mode 100644
index 00000000000..803f5fa9763
--- /dev/null
+++ b/db/migrations/5.1.49_enlarge_mailqueue.php
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * @see https://gitlab.studip.de/studip/studip/-/issues/1134
+ */
+final class EnlargeMailqueue extends Migration
+{
+    public function description()
+    {
+        return 'alters mail_queue_entries.mail to MEDIUMTEXT since TEXT is too short';
+    }
+
+    protected function up()
+    {
+        DBManager::get()->exec("ALTER TABLE `mail_queue_entries` MODIFY `mail` MEDIUMTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL");
+    }
+
+    protected function down()
+    {
+        DBManager::get()->exec("ALTER TABLE `mail_queue_entries` MODIFY `mail` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL");
+    }
+
+}
-- 
GitLab