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 Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
parent
7bda8970ae
commit
cfd3f7db81
2 changed files with 21 additions and 3 deletions
|
@ -2695,12 +2695,12 @@ CREATE TABLE `fieldmapping` ( -- koha to keyword mapping
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) 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,
|
`imagenumber` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`biblionumber` int(11) NOT NULL,
|
`biblionumber` int(11) NOT NULL,
|
||||||
`mimetype` varchar(15) NOT NULL,
|
`mimetype` varchar(15) NOT NULL,
|
||||||
|
|
|
@ -4892,6 +4892,24 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
|
||||||
SetVersion($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
|
=head1 FUNCTIONS
|
||||||
|
|
||||||
=head2 DropAllForeignKeys($table)
|
=head2 DropAllForeignKeys($table)
|
||||||
|
|
Loading…
Reference in a new issue