Framework: php artisan migrate --path option seems to be broken

Created on 15 Apr 2016  路  4Comments  路  Source: laravel/framework

Running php artisan migrate --path=/app/database/migrations/foo/ does not run the migrations under that directory. Output in the terminal is "Nothing to migrate".

The same issue seems to exist if the --path=/app/database/migrations/ as well (which is the default directory to run)

Most helpful comment

In my case, php artisan migrate --path=database/migrations/foo is enough. The app directory is not necessary.

All 4 comments

In my case, php artisan migrate --path=database/migrations/foo is enough. The app directory is not necessary.

thanks @zzpwestlife . That worked for me.

thanks @zzpwestlife. It 's worked like a charm

Open IlluminateDatabaseMigrationsMigrator.php file. At line 430 (Migrator::getMigrationFiles()). Replace return $this->files->glob($path.'/_.php'); with return Str::endsWith($path,'.php') ? [$path] : $this->files->glob($path.'/_.php');
Now the --path option will work normally

Was this page helpful?
0 / 5 - 0 ratings

Related issues

progmars picture progmars  路  3Comments

lzp819739483 picture lzp819739483  路  3Comments

ghost picture ghost  路  3Comments

Fuzzyma picture Fuzzyma  路  3Comments

SachinAgarwal1337 picture SachinAgarwal1337  路  3Comments