PHPackages                             stescacom/laravel-uuid-database-queue - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. stescacom/laravel-uuid-database-queue

ActiveProject[Queues &amp; Workers](/categories/queues)

stescacom/laravel-uuid-database-queue
=====================================

This enables laravel to use UUID for Job primary key, and enables proper interaction.

0112PHP

Since Oct 24Pushed 4y ago1 watchersCompare

[ Source](https://github.com/stescacom/laravel-uuid-database-queue)[ Packagist](https://packagist.org/packages/stescacom/laravel-uuid-database-queue)[ RSS](/packages/stescacom-laravel-uuid-database-queue/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Database Queue with UUID as Primary Key
===============================================

[](#laravel-database-queue-with-uuid-as-primary-key)

> **Problem**: With MySQL the adding a Job throws error if the datatype of `id` is `CHAR(36)` and no value is set when inserting a record.

This package provides service provider and necessary classes to allow you to insert records with `UUID` as primary key. The `UUID` is ordered and uses Laravel's `Str::orderedUuid()`.

Install the package
-------------------

[](#install-the-package)

To install the package use the command below

```
composer require stescacom/laravel-uuid-database-queue

```

Fresh Install of Laravel
------------------------

[](#fresh-install-of-laravel)

If you have a fresh Laravel project you'll need to to create migration for `jobs` table with the following Laravel command.

```
php artisan queue:table

```

Next open the created file with the name `create_jobs_table` in it, and make the following change

```
Schema::create('jobs', function (Blueprint  $table) {
	// $table->bigIncrements('id'); // remove this line
	$table->uuid('id')->primary(); // add this line
	$table->string('queue')->index();
	$table->longText('payload');
	$table->unsignedTinyInteger('attempts');
	$table->unsignedInteger('reserved_at')->nullable();
	$table->unsignedInteger('available_at');
	$table->unsignedInteger('created_at');
});

```

Continue from section [`Run Migrations`](#run-migrations)

Existing Project With Migrated Jobs Table
-----------------------------------------

[](#existing-project-with-migrated-jobs-table)

> Before you add the service provider check if can see the migration `2021_10_24_161222_change_id_column_in_jobs_table` with `php artisan migrate:status`If you do see it then skip to [`Run Migrations`](#run-migrations)

In case you've already run the migration and the table exists in your database, you need to register the package service provider first. Open your project's `config/app.php` and add the following line to `providers` array.

```
Stescacom\LaravelUuidDatabaseQueue\LaravelUuidDatabaseQueueProvider::class

```

After this run the migration.

Run Migrations
--------------

[](#run-migrations)

Now the migrations are all set to run. use the following command

```
php artisan migrate

```

Setup Service Provider
----------------------

[](#setup-service-provider)

The final step is to replace `Illuminate\Queue\QueueServiceProvider::class` with `Stescacom\LaravelUuidDatabaseQueue\QueueServiceProvider::class`, open `config/app.php`. Remove or comment the line `Illuminate\Queue\QueueServiceProvider::class` inside the `providers` array and add `Stescacom\LaravelUuidDatabaseQueue\QueueServiceProvider::class`

You are all set...

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ef13e870e64cfbe0674e5f75f301f2199860b5e215ee114850973e8c810da692?d=identicon)[urstesca](/maintainers/urstesca)

### Embed Badge

![Health badge](/badges/stescacom-laravel-uuid-database-queue/health.svg)

```
[![Health](https://phpackages.com/badges/stescacom-laravel-uuid-database-queue/health.svg)](https://phpackages.com/packages/stescacom-laravel-uuid-database-queue)
```

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.3M26](/packages/league-geotools)[amphp/parser

A generator parser to make streaming parsers simple.

14952.8M16](/packages/amphp-parser)[amphp/serialization

Serialization tools for IPC and data storage in PHP.

13451.1M18](/packages/amphp-serialization)[enqueue/enqueue

Message Queue Library

19820.0M56](/packages/enqueue-enqueue)[deliciousbrains/wp-background-processing

WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks.

1.1k409.8k6](/packages/deliciousbrains-wp-background-processing)[react/async

Async utilities and fibers for ReactPHP

2238.8M170](/packages/react-async)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
