diff --git a/laravel/cli/tasks/migrate/resolver.php b/laravel/cli/tasks/migrate/resolver.php index 6d3002ff..3e0ac21e 100644 --- a/laravel/cli/tasks/migrate/resolver.php +++ b/laravel/cli/tasks/migrate/resolver.php @@ -127,6 +127,14 @@ protected function resolve($migrations) $instances[] = compact('bundle', 'name', 'migration'); } + // At this point the migrations are only sorted within their + // bundles so we need to re-sort them by name to ensure they + // are in a consistent order. + usort($migrations, function($a, $b) + { + return strcmp($a['name'], $b['name']); + }); + return $instances; }