Skip to content

Conversation

@jdd-canada
Copy link
Contributor

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.

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.
@dereuromark dereuromark merged commit 72c8d77 into dereuromark:master Nov 22, 2025
8 checks passed
@dereuromark
Copy link
Owner

I wonder why the tests didnt fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants