例如。我有两个表,checkers
表和users
表。
我想首先迁移 users
表,因为 checkers
表在“users”表上有一个外键,但 checkers
表执行第一的。
我使用php artisan migrate
命令。
我必须先手动运行users
表还是有更好的方法?
最佳答案
刚找到答案。
The number before the migration file name is a date time, make your user migration and earlier time and your should be good
Source - http://forumsarchive.laravel.io/viewtopic.php?id=10246
关于php - 如何以自定义顺序运行迁移,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27677048/