Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 918
    • Issues 918
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Development
  • Core
  • Issues
  • #2279

Closed
Open
Opened Dec 30, 2020 by eileen@eileen🎱Owner

Proposal - add hook alterIndices

Proposal - add hook alterIndices to ```CRM_Core_DAO_AllCoreTables::indices()``

The above function returns the indices that should exist according to our schema and we have the apiv3 function System.updateindexes to reconcile the indices that do exist against those that should.

However, the stock indices are not perhaps better viewed as a guideline. At WMF we have removed some (e.g contribution_status_id) that are not good for performance and added others (eg. nick_name, preferred_language) that are helpful to us but perhaps not universally applicable.

Since we try to keep our development installs in line with production it's useful for us to be able to reconcile against our tweaked set of indices - and possibly to share or at least document them.

Adding a hook would be helpful here - although it would be more helpful if there were a UI to view & individually add missing indices. I somewhat contemplate doing this UI - but I'm not 100% sure where it would sit - probably a core extension that promotes itself after upgrades

Edited Dec 30, 2020 by eileen
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: dev/core#2279