Commit db64606
committed
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.1 parent b9bf7a5 commit db64606
File tree
1 file changed
+1
-1
lines changed- config/Migrations
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
0 commit comments