I am getting "Migration not found" when running migrate:refresh with --path option.
Seems that the script tries to rollback all migrations, not only specified ones.
php artisan migrate:refresh --path=packages/package/src/database/migrations
Migration not found: 2016_06_01_000005_create_oauth_personal_access_clients_table
Migration not found: 2016_06_01_000004_create_oauth_clients_table
Migration not found: 2016_06_01_000003_create_oauth_refresh_tokens_table
Migration not found: 2016_06_01_000002_create_oauth_access_tokens_table
Migration not found: 2016_06_01_000001_create_oauth_auth_codes_table
Migration not found: 2014_10_12_100000_create_password_resets_table
Migration not found: 2014_10_12_000000_create_users_table
The final result is actually fine. It refreshes the specified folder migrations.
i'm getting this same error, when trying to drop a column
If you run a migration from a path and then; run php artisan migrate:rollback or something which calls Migrator::rollbackMigrations method like migrate:refresh; the same error will be noted.
e.g.:
โฏ art migrate --path=database/migrations/foo
Migrating: 2018_10_23_104449_foo
Migrated: 2018_10_23_104449_foo
โฏ art migrate:rollback
Migration not found: 2018_10_23_104449_foo
Storing the path of the migration files can change this behavior. But is this what Laravel should do?
@dorin-niscu you need to use
php artisan migrate:refresh --path=vendor/laravel/passport/database/migrations
@erdemkeren you didn't specify the path with the rollback command.
@driesvints Indeed. I was talking about persisting the path of the migration files to migrations table inside another column (maybe).
@erdemkeren that's not something we're going to change. If the location of the migrations would change you'd have to update the values in the database as well.
Hello everyone !
The post is a year old, but I found a solution with your help.
To remove this error, go to your DB and drop the column.
after you have to make a
php artisan migrete
Most helpful comment
Hello everyone !
The post is a year old, but I found a solution with your help.
To remove this error, go to your DB and drop the column.
after you have to make a
php artisan migrete