Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SachinAgarwal's avatar

[L5] php artisan migrate --path option

I created migration files in a sub directory in app/database/migrations.
And I was trying to migrate those files with --path option of the migrate command.
But it is not working. It always shows "Nothing to migrate", even though I have files in it.

php artisan migrate --path=ngo

this is how I am running the command.
Does anyone know about it?

0 likes
8 replies
usman's avatar
usman
Best Answer
Level 27

@SachinAgarwal can you show the directory structure. If the app is installation root then try:

./artisan migrate --path="database/migrations/ngo"

4 likes
moharaja's avatar

this is not working for my

The command "migrate --path="\database\migrations\project1\package1"" does not exist.

moharaja's avatar

ok i got solution it will be migrate --path=database\migrations\project1\package1

Please or to participate in this conversation.