From e8f94c2215469dc5933f1774a80880db9808d5ca Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 4 Nov 2021 10:44:28 +0100 Subject: [PATCH] Bug 29386: Extend background_jobs.data to LONGTEXT TEXT is too small, we must extend it to allow bigger jobs. --- installer/data/mysql/atomicupdate/bug_29386.pl | 14 ++++++++++++++ installer/data/mysql/kohastructure.sql | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 installer/data/mysql/atomicupdate/bug_29386.pl diff --git a/installer/data/mysql/atomicupdate/bug_29386.pl b/installer/data/mysql/atomicupdate/bug_29386.pl new file mode 100755 index 00000000000..ba57d823a17 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_29386.pl @@ -0,0 +1,14 @@ +use Modern::Perl; + +return { + bug_number => "29386", + description => "Extend background_jobs.data to LONGTEXT", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + $dbh->do(q| + ALTER TABLE background_jobs + CHANGE COLUMN `data` `data` LONGTEXT DEFAULT NULL + |); + }, +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 64a06a084bc..ccf99df9e0e 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -944,7 +944,7 @@ CREATE TABLE `background_jobs` ( `size` int(11) DEFAULT NULL, `borrowernumber` int(11) DEFAULT NULL, `type` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `data` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `data` LONGTEXT COLLATE utf8mb4_unicode_ci DEFAULT NULL, `enqueued_on` datetime DEFAULT NULL, `started_on` datetime DEFAULT NULL, `ended_on` datetime DEFAULT NULL, -- 2.25.1