@@ -, +, @@
for table subscriptionhistory
where each note is greater than 150 characters.
---
C4/Serials.pm | 1 +
installer/data/mysql/atomicupdate/bug_10215.perl | 9 +++++++++
installer/data/mysql/kohastructure.sql | 4 ++--
3 files changed, 12 insertions(+), 2 deletions(-)
create mode 100644 installer/data/mysql/atomicupdate/bug_10215.perl
--- a/C4/Serials.pm
+++ a/C4/Serials.pm
@@ -435,6 +435,7 @@ sub GetSubscriptionsFromBiblionumber {
} else {
$subs->{histenddate} = "";
}
+ $subs->{opacnote} //= "";
$subs->{opacnote} =~ s/\n/\
/g;
$subs->{missinglist} =~ s/\n/\
/g;
$subs->{recievedlist} =~ s/\n/\
/g;
--- a/installer/data/mysql/atomicupdate/bug_10215.perl
+++ a/installer/data/mysql/atomicupdate/bug_10215.perl
@@ -0,0 +1,9 @@
+$DBversion = 'XXX';
+if ( CheckVersion($DBversion) ) {
+
+ $dbh->do(q{ALTER TABLE subscriptionhistory CHANGE opacnote opacnote LONGTEXT NULL});
+ $dbh->do(q{ALTER TABLE subscriptionhistory CHANGE librariannote librariannote LONGTEXT NULL});
+
+ SetVersion ($DBversion);
+ print "Upgrade to $DBversion done (Bug 10215 - Increase the size of opacnote and librariannote for table subscriptionhistory)\n";
+}
--- a/installer/data/mysql/kohastructure.sql
+++ a/installer/data/mysql/kohastructure.sql
@@ -2147,8 +2147,8 @@ CREATE TABLE `subscriptionhistory` (
`histenddate` date default NULL,
`missinglist` LONGTEXT NOT NULL,
`recievedlist` LONGTEXT NOT NULL,
- `opacnote` varchar(150) NOT NULL default '',
- `librariannote` varchar(150) NOT NULL default '',
+ `opacnote` LONGTEXT NOT NULL default '',
+ `librariannote` LONGTEXT NOT NULL default '',
PRIMARY KEY (`subscriptionid`),
KEY `biblionumber` (`biblionumber`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--