Open
Conversation
mrhiggi-close
approved these changes
Sep 3, 2024
4d5cae1 to
bdb3a47
Compare
921be30 to
ca0cf85
Compare
325e3d9 to
cbaad9e
Compare
938edf8 to
06a7f64
Compare
06a7f64 to
4d892a1
Compare
df741c6 to
da7ff90
Compare
0a74b35 to
0294080
Compare
7ca0518 to
e71fdd1
Compare
8fa5b90 to
1aec674
Compare
1aec674 to
4ccdebe
Compare
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.
The table at this point looks like this:
Note that the old unique constraint UNIQUE KEY
folder_id(folder_id,msg_uid,account_id) on the three columns is confusingly calledfolder_id. That's what you get when you don't name your constraints explicitly.After merging #870 we are sure that the old index/constraint is not used for retrieving data. So we can drop it, but...
It also powers the foreign key constraint on
folder_idcolumn, so I'm adding a one column index to power that constraint.It's most probable that the KEY
account_id_folder_id(account_id,folder_id) can be dropped now as well because it's a prefix of UNIQUE KEYix_imapuid_account_id_folder_id_msg_uid_desc(account_id,folder_id,msg_uidDESC), but again I want to keep PRs focused and I'll investigate and open another PR.Migration
I'll open a separate PR in the downstream with all the steps needed to perform in the downstream.
Based on PR #870
Full chain of PRs as of 2024-09-03
drop-old-imapuid-constraint➔one-more-force-indexone-more-force-index➔master