From db646066cfb386e94dc284e366f04c8994c303c3 Mon Sep 17 00:00:00 2001 From: JD Daniels Date: Fri, 21 Nov 2025 21:10:50 -0500 Subject: [PATCH] Fix PostgreSQL index name collision in MigrationQueueIndexOptimization The migration was creating an index named 'workerkey' on the queued_jobs table, but this name already exists on the queue_processes table (created in MigrationQueueInitV8). PostgreSQL requires index names to be unique across the entire schema, unlike MySQL which only requires uniqueness within a table. This caused the migration to fail with error: SQLSTATE[42P07]: Duplicate table: 7 ERROR: relation "workerkey" already exists Solution: Rename the index from 'workerkey' to 'queued_jobs_workerkey' to follow the table_column naming convention and avoid the collision. This fix is backwards compatible with MySQL and resolves the PostgreSQL migration failure. --- .../20251119005411_MigrationQueueIndexOptimization.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/Migrations/20251119005411_MigrationQueueIndexOptimization.php b/config/Migrations/20251119005411_MigrationQueueIndexOptimization.php index 4bd160b8..02bc6076 100644 --- a/config/Migrations/20251119005411_MigrationQueueIndexOptimization.php +++ b/config/Migrations/20251119005411_MigrationQueueIndexOptimization.php @@ -42,7 +42,7 @@ public function change(): void { ->addIndex( ['workerkey'], [ - 'name' => 'workerkey', + 'name' => 'queued_jobs_workerkey', ], ) ->update();