loading an sql file into mysql, often fails when loading the 'letter' table i have no idea why. the quick-fix is to drop - then create the database $ mysql koha_test < koha.sql ERROR 1005 (HY000) at line 3237: Can't create table 'koha_test.letter' (errno: 150) http://koha.1045719.n5.nabble.com/MySQL-Database-Restoring-Problem-from-3-4-x-to-3-8-0-td5710925.html
(In reply to comment #0) > loading an sql file into mysql, often fails when loading the 'letter' table > > i have no idea why. the quick-fix is to drop - then create the database > > > $ mysql koha_test < koha.sql > ERROR 1005 (HY000) at line 3237: Can't create table 'koha_test.letter' > (errno: 150) > > > http://koha.1045719.n5.nabble.com/MySQL-Database-Restoring-Problem-from-3-4- > x-to-3-8-0-td5710925.html hmmm, i bumped into this problem again... 'show engine innodb status' hints that its a foreign-key problem? ------------------------ LATEST FOREIGN KEY ERROR ------------------------ 121212 4:06:49 Error in foreign key constraint of table head/message_transports : there is no index in referenced table which would contain the columns as the first columns, or the data types in the referenced table do not match the ones in table. Constraint: , CONSTRAINT "message_transports_ibfk_3" FOREIGN KEY ("letter_module", "letter_c ode", "branchcode") REFERENCES "letter" ("module", "code", "branchcode") ON DELE TE CASCADE ON UPDATE CASCADE The index in the foreign key in table is "message_transports_ibfk_3" See http://dev.mysql.com/doc/refman/5.5/en/innodb-foreign-key-constraints.html for correct foreign key definition.
> > loading an sql file into mysql, often fails when loading the 'letter' table > > > > i have no idea why. the quick-fix is to drop - then create the database just a little update... it seems this error is triggered when a koha-3.6 .sql file is loaded into an existing koha-3.8 database so, this is ok $ mysql koha < ./koha-3.6.sql $ mysql koha < ./koha-3.8.sql but this fails $ mysql koha < ./koha-3.8.sql $ mysql koha < ./koha-3.6.sql hope that helps someone :)
> just a little update... > > it seems this error is triggered when a koha-3.6 .sql file is loaded into an > existing koha-3.8 database ahh, thats probably a koha 3.6 .sql file, or *earlier*
This is certainly not valid anymore. Please reopen if I am wrong.