“General error: 1005 Can't create table” Using Laravel Schema Build and Foreign Keys

后端 未结 11 1155
予麋鹿
予麋鹿 2020-12-03 07:02

Essentially, I am having the same issue as this guy, minus the table prefix. Because I have no table prefix, his fix does not work. http://forums.laravel.com/viewtopic.php?i

11条回答
  •  感动是毒
    2020-12-03 07:16

    I received the same error because I forgot to set the table type to InnoDB on the referenced table:

    $table->engine = 'InnoDB';
    

提交回复
热议问题