Cache_locks error

I have a Queue Job Class that I need to make sure it does not overlap, so I am implementing it here

class ProcessJob implements ShouldQueue {

   public function handle() {
    ...
   }

   public function middleware()
    {
        return [new WithoutOverlapping($this->platformId)];
    }
}

but it returns this error:

[2025-06-17 18:54:59] local.ERROR: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'plugin_2025_03_05.cache_locks' doesn't exist in /Users/xwewe/Sites/oc-plugin/vendor/laravel/framework/src/Illuminate/Database/Connection.php:566

Hi @chris,

The cache_locks table is not created by default in OctoberCMS.

You can create a migration with:

Schema::create('cache_locks', function (Blueprint $table) {
    $table->string('key')->primary();
    $table->string('owner');
    $table->integer('expiration');
});

The schema can be found in vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/cache_locks.stub

I wonder if Queues - Laravel 10.x - The PHP Framework For Web Artisans would be more elegant to use.

thanks @apinard
Seems like there are a few tables like this that are spin off during OC installation.

I tried using Bus as well form Laravel but another table is missing as well.

The job is a Queue job indeed.

@chris Did adding the cache_locks table solve the issue?