Skip to content

Commit

Permalink
Fix breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Oct 2, 2020
1 parent fcf175b commit b2a3641
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Illuminate/Database/Console/Migrations/MigrateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,14 @@ protected function loadSchemaState()
*/
protected function schemaPath($connection)
{
return $this->option('schema-path') ?: database_path('schema/'.$connection->getName().'-schema.dump');
if ($this->option('schema-path')) {
return $this->option('schema-path');
}

if (file_exists($path = database_path('schema/'.$connection->getName().'-schema.dump'))) {
return $path;
}

return database_path('schema/'.$connection->getName().'-schema.sql');
}
}

0 comments on commit b2a3641

Please sign in to comment.