Bug 8312

Summary: Bug 1633 causes an error when upgrading the database
Product: Koha Reporter: Robin Sheat <robin>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED INVALID QA Contact:
Severity: major    
Priority: P5 - low CC: chris
Version: 3.8   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 1633    
Bug Blocks:    

Description Robin Sheat 2012-06-25 17:13:55 UTC
This causes an error on upgrade:

[Tue Jun 26 04:58:51 2012] updatedatabase.pl: DBD::mysql::db do failed: Can't create table 'koha_central.biblioimages' (errno: 150) at /home/robin/kohaclones/ca/installer/data/mysql/updatedatabase.pl line 4634.

This SQL:

       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

doesn't work unless everything after 'ENGINE' is ommitted.
Comment 1 Robin Sheat 2012-06-25 17:20:27 UTC
This seems to be because the biblio table on my database is MyISAM, and so forcing it to InnoDB causes breakage.
Comment 2 Robin Sheat 2012-06-25 17:36:43 UTC
This appears to be a problem at my end, rather than with koha. Cancelling.
Comment 3 Chris Cormack 2012-06-26 01:30:03 UTC
Also in older mysql, it was TYPE=InnoDB, and in later ENGINE=InnoDB

Just in case that was the issue