I have two Laravel projects. They are in different folders. It is okay until then.
Currently my projects use Laravel 5. The last one.
I have one project I tried to migrate. But, I do not have any idea why it is looking for migration files of another.
I run from /project1
to look for /project1/database/migrations
by using this command:
php artisan migrate:refresh
However, it also looks for migrations of the project2
in the /project1/database/migrations
like above:
Definitely it is not there. Because it doesn't belong to the /project1
. Look at:
So, how does Laravel try to load migrations of any other project?
Ps.: I have already tried to clear the Laravel application cache. But, the bug persists.
As you stated your application is sharing the same database, so they share the same migrations table, just go to /config/database.php
and rename it to the name you want:
/*
|--------------------------------------------------------------------------
| Migration Repository Table
|--------------------------------------------------------------------------
|
| This table keeps track of all the migrations that have already run for
| your application. Using this information, we can determine which of
| the migrations on disk haven't actually been run in the database.
|
*/
'migrations' => 'migrations',
As pointed in the comment you are using one database for two projects. The first answer pointed you on the rigt track how to rename the migrations table.
If you are sharing some tables with both projects however and each project still acts like it's own, you should take a look at this question (and the first answer) because this would be a better way to handle it:
Can I place two migration tables in different databases when using Laravel?