-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRM-20533 - avoid errors when creating missing indices. #10414
Conversation
Tested this on an affected site and it worked well, thanks @jmcclelland! |
As the changes made here loops on This is much likely to happen as Can we migrate this to |
Drop existing indices with the same name and drop and re-create dependent foreign keys.
Thanks for the feedback @jitendrapurohit . I just rebased against master and removed the duplicate code. How does this look? |
Jenkins, test this please? @jmcclelland This patch does not apply to master for me currently. I can't tell why - Jenkins seems to be applying it OK, and applying the individual commit .diffs does work ... don't worry about this unless you have issues too! Got it: If applying to 4.7.22, this depends on #10566. Still IDK why my local git copy would not merge it, but nvm. |
While upgrading a site to CiviCRM 4.7.22 I had problems to create the missing indices. During the investigation, I found this PR and also #10566. Even though I hadn't had the chance yet to fully review the code and check the logics, a few things caught my attention:
@jmcclelland I understand you're not responsible for the changes to the |
I agree with @davialexandre that getExistingIndices should be a separate function to getMissingIndices ... and with his comments above in general |
okay, there seems to be some terminology confusion as Anyway, the ambiguity is being removed now in an alternate PR #10908 with a straightforward approach of deleting incomplete indices directly from the |
@jitendrapurohit there are several attempts at fixing this issue - can we close this PR since it seems you superceded it. Annecdotally there is still a variant we have not caught but I don't really know what it is |
Drop existing indices with the same name and drop and re-create
dependent foreign keys.