First time here? Check out the FAQ!

Revision history  [back]

It certainly due to the fact that before MySQL was using by default MyISAM as it's storage engine and the version 5.5 now use InnoDB, it seems to create some uncompatibility on altering table containing foreign key constraint (i.e it works with myisam but not innodb) so the migrate fails

doing this solve the issue for me (I know it's a work around, but it may helps to create a more generic solution)

open a MySQL shell (or phpmyadmin whatsoever) and run

 show create table askbot_anonymousanswer;

you should see a line that looks like this

CONSTRAINT `question_post_id_refs_id_648edfb25e596e3` FOREIGN KEY (`question_post_id`) REFERENCES `askbot_post` (`id`)

note the name of this question_post_id_refs_id_648edfb25e596e3

and then run

alter table askbot_anonymousanswer drop foreign key   question_post_id_refs_id_648edfb25e596e3 ;
alter table askbot_anonymousanswer change question_post_id question_id int(11) ;

It certainly due to the fact that before MySQL was using by default MyISAM as it's storage engine and the version 5.5 now use InnoDB, it seems to create some uncompatibility on altering table containing foreign key constraint (i.e it works with myisam but not innodb) so the migrate fails

doing this solve the issue for me (I know it's a work around, but it may helps to create a more generic solution)

open a MySQL shell (or phpmyadmin whatsoever) and run

 show create table askbot_anonymousanswer;

you should see a line that looks like this

CONSTRAINT `question_post_id_refs_id_648edfb25e596e3` FOREIGN KEY (`question_post_id`) REFERENCES `askbot_post` (`id`)

note the name of this question_post_id_refs_id_648edfb25e596e3

and then run

alter table askbot_anonymousanswer drop foreign key   question_post_id_refs_id_648edfb25e596e3 ;
alter table askbot_anonymousanswer change question_post_id question_id int(11) ;