File tree 3 files changed +21
-2
lines changed
3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 91
91
<INDEXES >
92
92
<INDEX NAME =" authorid" UNIQUE =" false" FIELDS =" authorid" />
93
93
<INDEX NAME =" conversationid" UNIQUE =" false" FIELDS =" conversationid" />
94
+ <INDEX NAME =" dialogueid" UNIQUE =" false" FIELDS =" dialogueid" />
94
95
</INDEXES >
95
96
</TABLE >
96
97
<TABLE NAME =" dialogue_flags" COMMENT =" Flags set against a dialogue, conversation or message e.g read" >
Original file line number Diff line number Diff line change 30
30
* @return bool
31
31
*/
32
32
function xmldb_dialogue_upgrade ($ oldversion ) {
33
+ global $ DB ;
34
+
35
+ $ dbman = $ DB ->get_manager ();
36
+
37
+ if ($ oldversion < 2024120900 ) {
38
+ // Define index dialogueid (not unique) to be added to dialogue_messages.
39
+ $ table = new xmldb_table ('dialogue_messages ' );
40
+ $ index = new xmldb_index ('dialogueid ' , XMLDB_INDEX_NOTUNIQUE , ['dialogueid ' ]);
41
+
42
+ // Conditionally launch add index userid.
43
+ if (!$ dbman ->index_exists ($ table , $ index )) {
44
+ $ dbman ->add_index ($ table , $ index );
45
+ }
46
+
47
+ // savepoint reached.
48
+ upgrade_mod_savepoint (true , 2024120900 , 'dialogue ' );
49
+ }
50
+
33
51
return true ;
34
52
}
Original file line number Diff line number Diff line change 23
23
*/
24
24
defined ('MOODLE_INTERNAL ' ) || die ();
25
25
26
- $ plugin ->version = 2024100901 ;
27
- $ plugin ->release = 2024100901 ;
26
+ $ plugin ->version = 2024120900 ;
27
+ $ plugin ->release = 2024120900 ;
28
28
$ plugin ->requires = 2022112805 ; // Requires 4.1 or higher.
29
29
$ plugin ->component = 'mod_dialogue ' ; // Full name of the plugin (used for diagnostics).
30
30
$ plugin ->maturity = MATURITY_STABLE ; // This version's maturity level.
You can’t perform that action at this time.
0 commit comments