Bugzilla – Attachment 147020 Details for
Bug 22428
MARC modification template cuts text to 100 characters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22428: Change datatype of field_value to text
Bug-22428-Change-datatype-of-fieldvalue-to-text.patch (text/plain), 2.36 KB, created by
Matt Blenkinsop
on 2023-02-21 10:34:36 UTC
(
hide
)
Description:
Bug 22428: Change datatype of field_value to text
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2023-02-21 10:34:36 UTC
Size:
2.36 KB
patch
obsolete
>From a84d5ed14976ad76504a0f8c49b3653ca8010548 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Tue, 21 Feb 2023 10:31:13 +0000 >Subject: [PATCH] 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 >--- > .../bug_22428-change_field_value_column.pl | 16 ++++++++++++++++ > installer/data/mysql/kohastructure.sql | 2 +- > 2 files changed, 17 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_22428-change_field_value_column.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_22428-change_field_value_column.pl b/installer/data/mysql/atomicupdate/bug_22428-change_field_value_column.pl >new file mode 100644 >index 00000000000..9088cfb8b35 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_22428-change_field_value_column.pl >@@ -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."; >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 03d6cbebc90..03dd4766de7 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -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, >-- >2.37.1 (Apple Git-137.1)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22428
:
147020
|
147021
|
147074
|
147075
|
147374
|
147375
|
147376