i too drop table user and i want to run php artisan migrate:reset throw below error :
[Illuminate\Database\QueryException]
SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'laravel5.users' (SQL: drop table `users`)
[PDOException]
SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'laravel5.users'
you have few options:
if you have all your tables in migration folder & you are not yet in production mode, delete the database and run migrate again
you could modify the migration table and remove reference to password_reset table
i can create user migration but can't create password_resets migration i delete migration table and after that run php artisan migrate but throw below error :
[Illuminate\Database\QueryException]
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'laravel5.password_resets' doesn't exist (SQL: alter table `password_resets` add `email
` varchar(255) not null, add `token` varchar(255) not null, add `created_at` timestamp default 0 not null)
[PDOException]
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'laravel5.password_resets' doesn't exist
You could just comment out the contents of the down() method in your migration. The issue is caused because Schema::drop('foobar') translates to the sql command DROP TABLE foobar;
So you can comment out the Schema::drop() or try using Schema::dropIfExists() instead.
Hope that helps
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community