Bugzilla – Attachment 8148 Details for
Bug 7587
Wrong table name for local cover images
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 7587: Fix table name for biblioimages table
SIGNED-OFF-Bug-7587-Fix-table-name-for-biblioimage.patch (text/plain), 2.70 KB, created by
Katrin Fischer
on 2012-03-10 17:48:38 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 7587: Fix table name for biblioimages table
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2012-03-10 17:48:38 UTC
Size:
2.70 KB
patch
obsolete
>From e461f69ce54a2c01dcd50fd23098da185b79597c Mon Sep 17 00:00:00 2001 >From: Jared Camins-Esakov <jcamins@cpbibliography.com> >Date: Fri, 9 Mar 2012 07:24:43 -0500 >Subject: [PATCH] [SIGNED-OFF] Bug 7587: Fix table name for biblioimages table > >The kohastructure.sql file had the wrong name for the biblioimages table, >which broke the local cover images feature for new installations, and filled >the log with error messages. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >1) Checked a broken installation with wrong table name. >2) Checked for a new installation >Feature works perfectly. > >http://bugs.koha-community.org/show_bug.cgi?id=7487 >--- > installer/data/mysql/kohastructure.sql | 6 +++--- > installer/data/mysql/updatedatabase.pl | 18 ++++++++++++++++++ > 2 files changed, 21 insertions(+), 3 deletions(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 9dbd032..153e17b 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2695,12 +2695,12 @@ CREATE TABLE `fieldmapping` ( -- koha to keyword mapping > ) ENGINE=InnoDB DEFAULT CHARSET=utf8; > > -- >--- Table structure for table `bibliocoverimage` >+-- Table structure for table `biblioimages` > -- > >-DROP TABLE IF EXISTS `bibliocoverimage`; >+DROP TABLE IF EXISTS `biblioimages`; > >-CREATE TABLE `bibliocoverimage` ( >+CREATE TABLE `biblioimages` ( > `imagenumber` int(11) NOT NULL AUTO_INCREMENT, > `biblionumber` int(11) NOT NULL, > `mimetype` varchar(15) NOT NULL, >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index b844560..72cbedf 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -4892,6 +4892,24 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "3.07.00.XXX"; >+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { >+ $dbh->do( q|DROP TABLE bibliocoverimage;| ); >+ $dbh->do( >+ q|CREATE TABLE biblioimages ( >+ imagenumber int(11) NOT NULL AUTO_INCREMENT, >+ biblionumber int(11) NOT NULL, >+ mimetype varchar(15) NOT NULL, >+ imagefile mediumblob NOT NULL, >+ thumbnail mediumblob NOT NULL, >+ PRIMARY KEY (imagenumber), >+ CONSTRAINT bibliocoverimage_fk1 FOREIGN KEY (biblionumber) REFERENCES biblio (biblionumber) ON DELETE CASCADE ON UPDATE CASCADE >+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;| >+ ); >+ print "Upgrade to $DBversion done (Correct table name for local cover images [please disregard any error messages])\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 DropAllForeignKeys($table) >-- >1.7.5.4
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 7587
:
8117
| 8148