Support URLs up to 2048 characters#207
Merged
riasvdv merged 8 commits intoriasvdv:mainfrom Feb 11, 2025
Merged
Conversation
32ff3bd to
8a385b5
Compare
Owner
|
Thank you for this! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Since some of our redirects contain some large query parameters, we would like the URL field limit to be increased to 2048 characters (this is a generally agreed upon limit, although no exact limit has been defined nor enforced).
Since column indexes only work for columns up to 255 characters, I have added an additional MD5 hashed column.
Since a MD5 hash is always 32 characters long, this can be indexed and should be decently unique.
I have adjusted the queries to use this new indexed column, so the speed of these queries should be similar to how they were.
The queries will still ensure the actual URL matches, since there is still a chance for different URLs to have the same MD5 hash.
I also noticed that when publishing the migrations of the plugin, they are ordered alphabetically, which does not run properly (since adding a description column to the
redirectstable happens before theredirectstable even exists).So I have also adjusted this so that it adds a single second to the timestamp of the migrations that should be run after the original tables are created (including these new migrations), making it easier to use the plugin.