MDL-61605 quiz report: add missing index/key
[moodle.git] / mod / quiz / report / overview / db / install.xml
index 28ab2be..6eb80f6 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<XMLDB PATH="mod/quiz/report/overview/db" VERSION="20120122" COMMENT="XMLDB file for Moodle mod/quiz/report/overview"
+<XMLDB PATH="mod/quiz/report/overview/db" VERSION="20180319" COMMENT="XMLDB file for Moodle mod/quiz/report/overview"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="../../../../../lib/xmldb/xmldb.xsd"
 >
@@ -16,6 +16,7 @@
       </FIELDS>
       <KEYS>
         <KEY NAME="primary" TYPE="primary" FIELDS="id"/>
+        <KEY NAME="questionusageid-slot" TYPE="foreign-unique" FIELDS="questionusageid, slot" REFTABLE="question_attempts" REFFIELDS="questionusageid, slot"/>
       </KEYS>
     </TABLE>
   </TABLES>