From d79599b7ecd384ae5b8beee12e80fb522b1e4583 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. Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- 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 0000000000..ba57d823a1 --- /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 7aec5d53f6..b84ce3c567 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -955,7 +955,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.39.5