From 42796ddd1909206720ce25c12fac023435b9ee7a Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 25 Mar 2021 14:29:06 +0000 Subject: [PATCH] Bug 27726: Increase 'content' field size This alternate patch increases the field size from a 255 character varchar to a 65535 character text field. This allows for more detailed problem reports to be submitted. Signed-off-by: Amit Gupta Signed-off-by: Petro Vashchuk Signed-off-by: Katrin Fischer --- installer/data/mysql/atomicupdate/bug_27726.perl | 6 ++++++ installer/data/mysql/kohastructure.sql | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_27726.perl diff --git a/installer/data/mysql/atomicupdate/bug_27726.perl b/installer/data/mysql/atomicupdate/bug_27726.perl new file mode 100644 index 0000000000..01d18acb25 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_27726.perl @@ -0,0 +1,6 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do("ALTER TABLE problem_reports MODIFY content TEXT NOT NULL"); + + NewVersion( $DBversion, 27726, "Increase field size for problem_reports.content"); +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index ae247e67c8..d2f264121d 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -4132,7 +4132,7 @@ DROP TABLE IF EXISTS `problem_reports`; CREATE TABLE `problem_reports` ( `reportid` int(11) NOT NULL AUTO_INCREMENT COMMENT 'unique identifier assigned by Koha', `title` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'report subject line', - `content` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'report message content', + `content` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'report message content', `borrowernumber` int(11) NOT NULL DEFAULT 0 COMMENT 'the user who created the problem report', `branchcode` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'borrower''s branch', `username` varchar(75) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'OPAC username', -- 2.20.1