Skip to content

[12.x] Add indexes to failed_jobs stub#58355

Merged
taylorotwell merged 1 commit into
laravel:12.xfrom
jackbayliss:add_indexes
Jan 13, 2026
Merged

[12.x] Add indexes to failed_jobs stub#58355
taylorotwell merged 1 commit into
laravel:12.xfrom
jackbayliss:add_indexes

Conversation

@jackbayliss

@jackbayliss jackbayliss commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

I noticed these indexes were added in the laravel repo so thought it be good to have here too - just consistent across the board then.

Just means everyone who generates the migration going forward gets the performance benefit automatically too.

Feel free to close if no use 🫡 (hyb)

@github-actions

Copy link
Copy Markdown

Thanks for submitting a PR!

Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@jackbayliss jackbayliss marked this pull request as ready for review January 12, 2026 23:05
@taylorotwell taylorotwell merged commit 47c4b39 into laravel:12.x Jan 13, 2026
72 checks passed
@onlime

onlime commented Jan 14, 2026

Copy link
Copy Markdown
Contributor

@jackbayliss thanks for this PR. But MySQL (tested with latest 8.4) does not like TEXT columns in indexes:

SQLSTATE[42000]: Syntax error or access violation: 1170 BLOB/TEXT column 'connection' used in key specification without a key length

So, currently it's also broken in laravel/laravel
Any idea why connection and queue originally were created as TEXT instead of just VARCHAR (string)? Should I submit a PR to fix this?

The other mystery is, why Laravel-News has presented this PR as single indexes on queue and failed_at, while Taylor's and your PR have implemented a compound index over connection, queue, failed_at which is a different thing.

@jackbayliss

jackbayliss commented Jan 14, 2026

Copy link
Copy Markdown
Contributor Author

@onlime I've got a PR #58362 to already revert this as I spotted it fairly quickly. (and laravel/laravel)

Not sure why it's text, but will let Taylor decide on if he'll just remove it or not.

Re laravel news - not sure, guessing someone didn;'t understand :D

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.

3 participants