Bugzilla – Attachment 19247 Details for
Bug 10215
Increase the size of opacnote and librariannote for table subscriptionhistory
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10215 - Increase the size of opacnote and librariannote for table subscriptionhistory
Bug-10215---Increase-the-size-of-opacnote-and-libr.patch (text/plain), 3.47 KB, created by
Kyle M Hall (khall)
on 2013-06-26 17:42:08 UTC
(
hide
)
Description:
Bug 10215 - Increase the size of opacnote and librariannote for table subscriptionhistory
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-06-26 17:42:08 UTC
Size:
3.47 KB
patch
obsolete
>From d67778a427da912fd519bfb2e4609750c3f707cc Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 7 May 2013 12:49:03 -0400 >Subject: [PATCH] Bug 10215 - Increase the size of opacnote and librariannote for table subscriptionhistory > >We have librarians that are regularly hitting the maximum number of >characters for the note fields in subscription history. They would like >to be able to store at least 1000 characters here. Converting the >varchar(150) to text should do it. > >Test Plan: >1) Apply this patch >2) Run updatedatabase.pl >3) Add public and private notes to a subscription history entry > where each note is greater than 150 characters. >4) Save and view the notes, the notes should not be truncated. >--- > C4/Serials.pm | 8 ++++---- > installer/data/mysql/kohastructure.sql | 4 ++-- > installer/data/mysql/updatedatabase.pl | 8 ++++++++ > 3 files changed, 14 insertions(+), 6 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 76d3fc7..72a5fc3 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -483,7 +483,7 @@ sub GetSubscriptionsFromBiblionumber { > $subs->{startdate} = format_date( $subs->{startdate} ); > $subs->{histstartdate} = format_date( $subs->{histstartdate} ); > $subs->{histenddate} = format_date( $subs->{histenddate} ); >- $subs->{opacnote} =~ s/\n/\<br\/\>/g; >+ $subs->{opacnote} . q{} =~ s/\n/\<br\/\>/g; > $subs->{missinglist} =~ s/\n/\<br\/\>/g; > $subs->{recievedlist} =~ s/\n/\<br\/\>/g; > $subs->{ "periodicity" . $subs->{periodicity} } = 1; >@@ -1087,9 +1087,9 @@ sub ModSubscriptionHistory { > WHERE subscriptionid=? > "; > my $sth = $dbh->prepare($query); >- $recievedlist =~ s/^; //; >- $missinglist =~ s/^; //; >- $opacnote =~ s/^; //; >+ $recievedlist =~ s/^; //; >+ $missinglist =~ s/^; //; >+ $opacnote . q{} =~ s/^; //; > $sth->execute( $histstartdate, $enddate, $recievedlist, $missinglist, $opacnote, $librariannote, $subscriptionid ); > return $sth->rows; > } >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index d7eebdd..4a85892 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2046,8 +2046,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` text NULL, >+ `librariannote` text NULL, > PRIMARY KEY (`subscriptionid`), > KEY `biblionumber` (`biblionumber`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8; >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 5963d24..2e8d9e0 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -7010,6 +7010,14 @@ CREATE TABLE IF NOT EXISTS borrower_files ( > SetVersion($DBversion); > } > >+$DBversion = "3.13.00.XXX"; >+if ( CheckVersion($DBversion) ) { >+ $dbh->do(q{ALTER TABLE subscriptionhistory CHANGE opacnote opacnote TEXT NULL}); >+ $dbh->do(q{ALTER TABLE subscriptionhistory CHANGE librariannote librariannote TEXT NULL}); >+ print "Upgrade to $DBversion done (Bug 10215 - Increase the size of opacnote and librariannote for table subscriptionhistory)\n"; >+ SetVersion ($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >-- >1.7.2.5
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 10215
:
17998
|
17999
|
19247
|
19335
|
85395
|
85400
|
87705
|
90323
|
90324
|
90325
|
90355
|
90356
|
90357