如何更改Laravel中迁移的执行顺序?

I have some migrations that from a tables point of view, they are not in order as one table depends on another. Thus, when I rollback, because of foreign key constraints, I get errors so I have to drop some tables manually in a certain order and then run `php artisan migrate:rollback'.

Which is the best way to change the order of migrations when I run an artisan command? Should I change them manually by renaming?

  1. Drop all tables or roll back your migrations.
  2. All migrations at the first part have a date so you could change the order of migrations when you change them
  3. Execute all migrations.

or you can change the time of your migrations and after that use migrate:fresh.