phplaraveldatabase-migration

Laravel's Artisan says nothing to migrate


I installed migrations with php artisan migrate:install then created a migration with the php artisan migrate:make create_teams_table command. Now I try to run them with the following command that I made according to the official documentation:

php artisan migrate --path=app/foo/migrations/2014_01_21_143531_create_teams_table.php

This gives me the following on the console:

Nothing to migrate.

The migrations table in the database is empty and the new table isn't created neither. I don't understand why the documentation says foo in the path. What does foo mean and where does it comes from? First I tought that the path is wrong because of the foo thing and as I know the path is relative to the app folder so I changed it to app/database/migrations but it doesn't work. I also tried a lot of other path combination but none of them worked.

Did I entered the wrong path? In this case shouldn't the console show some other kind of helpfull message? What does foo mean? How can I run my migration?


Solution

  • That foo thing is just an example. Laravel will look for migrations to run in app/database/migrations on default. Try removing that --path parameter and see if it works.