Moodle

'courseid' field is used in both UNIQUE and INDEX keys

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.9
  • Fix Version/s: STABLE backlog
  • Component/s: Gradebook
  • Labels:
    None
  • Database:
    Any
  • Affected Branches:
    MOODLE_19_STABLE

Description

In tables grade_outcomes and grade_outcomes_courses, field courseid is used in both a UNIQUE key and an INDEX key, which is redundant.

Activity

Hide
Samuli Karevaara added a comment -

We had several more of these, mostly due to index names changing between updates and the old ones not being removed. There is a tool to check for missing indexes, maybe a similar one for duplicate ones would be nice too (producing the SQL needed to clear the extra ones, now I had to double check not to remove the current index and leave the old one: otherwise the extra index might re-appear in a later update as a "missing" index).

Show
Samuli Karevaara added a comment - We had several more of these, mostly due to index names changing between updates and the old ones not being removed. There is a tool to check for missing indexes, maybe a similar one for duplicate ones would be nice too (producing the SQL needed to clear the extra ones, now I had to double check not to remove the current index and leave the old one: otherwise the extra index might re-appear in a later update as a "missing" index).
Hide
Nicolas Connault added a comment -

Makes sense, will do in 1.9.6

Show
Nicolas Connault added a comment - Makes sense, will do in 1.9.6

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: