Lines 1-30
Link Here
|
1 |
#! /usr/bin/perl |
|
|
2 |
use strict; |
3 |
use warnings; |
4 |
use C4::Context; |
5 |
my $dbh = C4::Context->dbh; |
6 |
|
7 |
$dbh->do( |
8 |
q|CREATE TABLE `biblioimages` ( |
9 |
`imagenumber` int(11) NOT NULL AUTO_INCREMENT, |
10 |
`biblionumber` int(11) NOT NULL, |
11 |
`mimetype` varchar(15) NOT NULL, |
12 |
`imagefile` mediumblob NOT NULL, |
13 |
`thumbnail` mediumblob NOT NULL, |
14 |
PRIMARY KEY (`imagenumber`), |
15 |
CONSTRAINT `bibliocoverimage_fk1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE |
16 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8| |
17 |
); |
18 |
$dbh->do( |
19 |
q|INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACLocalCoverImages','0','Display local cover images on OPAC search and details pages.','1','YesNo')| |
20 |
); |
21 |
$dbh->do( |
22 |
q|INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('LocalCoverImages','0','Display local cover images on intranet search and details pages.','1','YesNo')| |
23 |
); |
24 |
$dbh->do( |
25 |
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')| |
26 |
); |
27 |
$dbh->do( |
28 |
q|INSERT INTO permissions (module_bit, code, description) VALUES (13, 'upload_local_cover_images', 'Upload local cover images')| |
29 |
); |
30 |
print "Upgrade done (Added support for local cover images)\n"; |