From 0324df6f889f18500cc8d201fdc2845f3e4d1acf Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 30 Oct 2023 20:47:50 +0100 Subject: SQL increase length of VARCHAR fields (#5756) * SQL increase length of VARCHAR fields Increase length of all fields, keeping the limits for: * Unique indexes on UTF-8: 191 bytes for MySQL; * Unique indexes on ASCII: 767 bytes for MySQL; * Max URL for external tools: 32768 characters; * Max VARCHAR: 65535 bytes for MySQL; Follow-up of https://github.com/FreshRSS/FreshRSS/pull/5038 Fix https://github.com/FreshRSS/FreshRSS/issues/4986 * Fix length test --- app/Models/Category.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Models/Category.php') diff --git a/app/Models/Category.php b/app/Models/Category.php index 3bb64df8b..370c49709 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -143,7 +143,7 @@ class FreshRSS_Category extends Minz_Model { } public function _name(string $value): void { - $this->name = mb_strcut(trim($value), 0, 255, 'UTF-8'); + $this->name = mb_strcut(trim($value), 0, FreshRSS_DatabaseDAO::LENGTH_INDEX_UNICODE, 'UTF-8'); } /** @param array|FreshRSS_Feed $values */ -- cgit v1.2.3