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

shopblocks picture shopblocks  路  3Comments

PhiloNL picture PhiloNL  路  3Comments

progmars picture progmars  路  3Comments

JamborJan picture JamborJan  路  3Comments

digirew picture digirew  路  3Comments