Laravel 8: Unknown column ‘uuid’ on failed_jobs table

Laravel 8: Unknown column ‘uuid’ on failed_jobs table

I recently upgraded a project of mine to Laravel 8 (from Laravel 7).
Everything seemed to go really well with just a few snags here and there. I then noticed however a number of errors were getting logged when the system tried to record failed jobs.
I turned out that Laravel 8 introduces an additional column in to the failed_jobs table that causes an error similar to the following if its not present:
SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘uuid’ in ‘field list’ (SQL: insert into `failed_jobs` (`uuid`, `connection`, `queue`, `payload`, `exception`, `failed_at`)

To get around this, I could have added the column but instead I updated the migration for failed_jobs (good housekeeping for the future) and then re-created the failed jobs table using that (safe as it has no dependancies).

Laravel 8 failed_jobs Table Migration

The first thing you’ll need to know is what the Laravel 8 failed_jobs migration looks like, I had to deploy a new Laravel 8 to find out so figured I’d paste it here is full for anyone that needs it.

In summary, you just need to add the line that generates the uuid column:

The full migration is:


use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateFailedJobsTable extends Migration
     * Run the migrations.
     * @return void
    public function up()
        Schema::create('failed_jobs', function (Blueprint $table) {

     * Reverse the migrations.
     * @return void
    public function down()

I then deleted the existing failed_jobs table in my database via PHPMYADMIN, obviously this could be different depending on how you have your project hosted:

Delete the migrations table entry

Important: you must also delete the migration from the migrations table, otherwise you will get a “Nothing to migrate” message when you try to run the migration for the failed_jobs table.

Again I used PHPMYADMIN, opened up the migrations table and delete the row listing my migration:

Run the migration to create the the failed_jobs table

Once you’ve updated the laravel failed_jobs migration, delete the existing failed_jobs table and removed the old entry from the migrations table, you can run the updated migration.  To do this for only the failed_jobs specific migration, use the following command, updating the migration filename:

php artisan migrate --path=/database/migrations/2021_02_19_000000_create_failed_jobs_table.php

That’s it – once the migration has run, you now have a new failed_jobs table compatible with Laravel 8!

Bob McKay

About Bob McKay

Bob is Director of Operations at Perfect Image, a full time father and husband, part-time tinkerer-with-wires, coder, Muay Thai practitioner, builder and cook. Loves love, tolerance and co-existance. Hates hate. Is aware of the irony of hating hate.

Disclosure Policy

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.