From b2a36411a774dba218fa312b8fd3bcf4be44a4e5 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 2 Oct 2020 09:17:12 -0500 Subject: [PATCH] Fix breaking change --- .../Database/Console/Migrations/MigrateCommand.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Illuminate/Database/Console/Migrations/MigrateCommand.php b/src/Illuminate/Database/Console/Migrations/MigrateCommand.php index 7d09cd9aeef4..ec35f8fed162 100755 --- a/src/Illuminate/Database/Console/Migrations/MigrateCommand.php +++ b/src/Illuminate/Database/Console/Migrations/MigrateCommand.php @@ -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'); } }