From: Paul Poulain Date: Tue, 24 Jan 2012 11:00:37 +0000 (+0100) Subject: Bug 1633 localcoverimages, updatedatabase & kohaversion for pushing X-Git-Tag: v3.08.00~592 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=43a46c507e729be9dc701123ded422fb666bb40c;p=koha_gimpoz Bug 1633 localcoverimages, updatedatabase & kohaversion for pushing --- diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index b12196c00d..0982282294 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4626,6 +4626,34 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.07.00.010"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $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| + ); + $dbh->do( + q|INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACLocalCoverImages','0','Display local cover images on OPAC search and details pages.','1','YesNo')| + ); + $dbh->do( + q|INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('LocalCoverImages','0','Display local cover images on intranet search and details pages.','1','YesNo')| + ); + $dbh->do( + q|INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowMultipleCovers','0','Allow multiple cover images to be attached to each bibliographic record.','1','YesNo')| + ); + $dbh->do( + q|INSERT INTO permissions (module_bit, code, description) VALUES (13, 'upload_local_cover_images', 'Upload local cover images')| + ); + print "Upgrade done (Added support for local cover images)\n"; + SetVersion($DBversion); +} =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/kohaversion.pl b/kohaversion.pl index e0e6e87e03..a73324e5f0 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts : use strict; sub kohaversion { - our $VERSION = '3.07.00.009'; + our $VERSION = '3.07.00.010'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install