Thursday, March 9, 2017

Getting Table/View Exists error when running laravel dusk tests

I have setup homestead environment for laravel. I am using the latest version of laravel(5.4). Whenever i run the command php artisan dusk, i get the following error:

1) Tests\Browser\auth\LawyerRegisterTest::lawyer_can_register
Illuminate\Database\QueryException: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'court_user' already exists (SQL: create table    `court_user` (`court_id` int not null, `user_id` int not null) default character set utf8 collate utf8_unicode_ci)

Do i have to reset the migrations everytime i run the dusk tests?



via Pawan Kumar

Advertisement