Bug 22428: Change datatype of field_value to text

This patch changes the datatype of the field_value column in
marc_modification_template_actions to "text". This is to stop text
strings longer than 100 characters from being chopped short and allow
longer strings up to 65,000 characters.

Test plan:
1) Follow the same steps outlined by Caroline in the problem statement
2) Apply patch
3) Follow the steps again and this time the text should upload with no
   problem

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Matt Blenkinsop 2023-02-21 10:31:13 +00:00 committed by Tomas Cohen Arazi
parent aba2453ad6
commit cce48fc7d4
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
2 changed files with 17 additions and 1 deletions

View File

@ -0,0 +1,16 @@
use Modern::Perl;
return {
bug_number => "22428",
description => "Changes the datatype of the field value column to text to stop input being cut short",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
$dbh->do(q{
ALTER TABLE marc_modification_template_actions MODIFY COLUMN field_value text;
});
say $out "Amended dataype of column field_value in table marc_modification_template_actions.";
},
};

View File

@ -3983,7 +3983,7 @@ CREATE TABLE `marc_modification_template_actions` (
`field_number` smallint(6) NOT NULL DEFAULT 0,
`from_field` varchar(3) NOT NULL,
`from_subfield` varchar(1) DEFAULT NULL,
`field_value` varchar(100) DEFAULT NULL,
`field_value` text DEFAULT NULL,
`to_field` varchar(3) DEFAULT NULL,
`to_subfield` varchar(1) DEFAULT NULL,
`to_regex_search` mediumtext DEFAULT NULL,