user image

Joseph Morgan
Published in : 2022-08-16

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'failed_jobs'

Laravel

Hello everyone, 
I just start using Laravel Queue and when I run this command to create the failed Jobs table 

php artisan queue:failed-table

then run migrate:fresh

php artisan migrate:fresh

It return this error 

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'failed_jobs'

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'failed_jobs'

How can I figure out this issue?

Comments

Mohamed Atef Date : 2022-08-16

Best answers

52

Best answers

52

It seems that you are using Laravel x9 and In Laravel 9 you don't have to create the failed_jobs table using this command because it already exists once you install a new Laravel application 9v. so please remove this migration and check your DB and you will find that the table is already there.
Good Luck

Joseph Morgan Date : 2022-08-16

Thank you so much, First time to notice this

Leave a comment

Join us

Join our community and get the chance to solve your code issues & share your opinion with us

Sign up Now

Related posts

Laravel Network is unreachable stream_socket_client 587
Publish date: 2022-02-16 | Comments: 4
How can I validate recaptcha in Livewire class ??
Publish date: 2022-02-23 | Comments: 2
Laravel API POST method returns 419
Publish date: 2022-08-03 | Comments: 1
Laravel install passport have access denied error
Publish date: 2022-02-23 | Comments: 4