Moodle
  1. Moodle
  2. MDL-30692

Consider creating one unique index on course_completion_aggr_methd (course, criteriatype)

    Details

    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Rank:
      33515

      Description

      This is one followup of MDL-28180.

      Just to avoid the course_completion_aggr_methd to become out of control it could be interesting to create one unique index on it by the course and criteriatype, to enforce that uniqueness from DB constraint.

      But there is one problem and it's that criteriatype is nullable, some some DBs will allow duplicates having that column null. So the complete plan is:

      1) Consider changing that null to 0 (current values and column specs) and make all the changes in logic needed to support that.
      2) Create the unique index (surely cleaning any duplicate again, just in case a new one has arrived, although it should not).

      That is, something for DEV backlog exclusively 100%. Ciao

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: