且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Laravel 迁移自引用外键问题

更新时间:2023-02-02 22:50:07

你必须把它分成两个 Schema 块,一个创建列,另一个添加 FK.mysql不能同时做这两件事.

You have to break this into two Schema blocks, one creating the columns, the other adding the FKs. mysql can't do both at the same time.