Skip to content
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

Update function to repair indexes to take table as a parameter #16146

Merged
merged 4 commits into from
Jan 3, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Fixes the System.getmissingindices & System.updateindexes apis to accept 'tables' (array or string) as a parameter & limit to the specified tables if supplied

Before

Table index repair is all or nothing

After

Table index repair can be filtered per

civicrm_api3('System', 'getmissingindices', ['tables' => ['civicrm_contact']]);
civicrm_api3('System', 'updateindexes', ['tables' => ['civicrm_contact']]);

Technical Details

The inconsistency on indexes vs indices preceeds this - I have used the right English rather than copy the existing api & left tidying that up (perhaps a wrapper api with the right name) out of scope.

Comments

I'd like to go a step further & allow individual indices to be dropped - this would allow a UI for this cleanup

@civibot
Copy link

civibot bot commented Dec 23, 2019

(Standard links)

@civibot civibot bot added the master label Dec 23, 2019
@eileenmcnaughton
Copy link
Contributor Author

New api actually added separately #16145

@colemanw
Copy link
Member

Non-blocking but grumpy cat comment: 🙀 :
Arguably new api functionality should be added to v4.

@eileenmcnaughton
Copy link
Contributor Author

@colemanw yeah - I just feel we don't have enough precedent for odd api functions in v4 to be sure how we want things like this to look

@mattwire mattwire merged commit 79c9b44 into civicrm:master Jan 3, 2020
@seamuslee001 seamuslee001 deleted the index_api2 branch January 3, 2020 21:22
@eileenmcnaughton
Copy link
Contributor Author

Thanks @mattwire

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants