Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-30692

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

XMLWordPrintable

    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • Moderate

      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

            sry_not4sale Aaron Barnes
            stronk7 Eloy Lafuente (stronk7)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.