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

Darkus62's avatar

Laravel5.6: Php artisan migrate --path is not working

I have migrations files in database/migrations/ef and migratons from a package. I just want to use the migrations from database/migrations/ef. I am using php artisan migrate --path=/database/migrations/ef, but it says "Nothing to migrate" and that is the right direction where the files are. My project is in Laravel 5.6

0 likes
5 replies
m7vm7v's avatar

Try with php artisan migrate --path="database/migrations/ef"

Darkus62's avatar

@m7vm7v Not working, and I just used:

  • Composer update
  • php artisan config:cache
  • php artisan view:clear
  • php artisan cache:clear

To clean everything and is not working either

m7vm7v's avatar

Check your migrations table in the database. You might have already executed them and meaning there will be 'Nothing to migrate'. Remember that if once executed the migrations have to be reverted/executed after if you have changed something. If already in production then write a new migration and describe only the additional information. Hope that makes sense. Just for debugging you could try to copy and paste all in the root migrations folder and migrate it to see if they are executable.

Darkus62's avatar

There is nothing in the database, I tried copying and pasting all the files in the root migrations folder and migrate, but I got the same message: "Nothing to migrate"

1 like
mdariftiens's avatar

I've tried with -

php artisan migrate --path="database/migrations/folderName"

working nicely.

1 like

Please or to participate in this conversation.