Search code examples
laravelqueuejobslaravel-10

Laravel is throwing an error: - "jobs" table not found


We are recently migrating old data to our new database. We are first exporting all the tables from the old database and importing it to our local database. Then after customizing some fields we are re-exporting them and importing the tables and contents to our new database.

However, after importing even though there are all the tables, (jobs, failed_jobs, job_batches) present in the database, laravel throws error when running jobs. It says, Base table or view 'new_db.jobs" doesn't exist.

We cannot find any solution for this.


Solution

  • Sometimes Laravel’s configuration cache might cause issues. Clear it using:

    php artisan config:cache

    php artisan config:clear