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

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

    XMLWordPrintable

Details

    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • Moderate

    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

      Attachments

        Issue Links

          Activity

            People

              sry_not4sale Aaron Barnes
              stronk7 Eloy Lafuente (stronk7)
              Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona), David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: