I am using laravel and laravel migration mechanism. I created tables and seted up foreign keys. But the tables are MyISSAM so no foreign keys are created. Where do I enable / configure this? (to change it to InnoDB and not in the mysql server).
I am using laravel and laravel migration mechanism. I created tables and seted up foreign keys. But the tables are MyISSAM so no foreign keys are created. Where do I enable / configure this? (to change it to InnoDB and not in the mysql server).
您可以编辑/config/database ase.php文件,搜索mysql个条目并更改:
'engine' => null,
to
'engine' => 'InnoDB',
This saves you from adding $table->engine = "InnoDB";
for each of your Schemas ;)