Laravel migration (errno: 150 “Foreign key constraint is incorrectly formed”)

后端 未结 18 2460
谎友^
谎友^ 2020-12-05 14:15

I have an orders table and a have a sell_shipping_labels which references orders.id as a foreign. However when I run the Laravel migration I get th

18条回答
  •  离开以前
    2020-12-05 14:56

    If the problem is still not solved, try it. you need to create the last associated table.

    You should first create orders and after create sell_shipping_labels table

    To solve the issue you should rename migration files of Category and Users to date of before Meals Migration file that create those before Meals table.

提交回复
热议问题