Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
3262330d
Commit
3262330d
authored
Sep 23, 2015
by
Pau Ferrer
Browse files
MDL-50805 Messages: Add index to message_read to speed up message crons
parent
3377cbc3
Changes
3
Hide whitespace changes
Inline
Side-by-side
lib/db/install.xml
View file @
3262330d
...
...
@@ -565,6 +565,7 @@
<INDEXES>
<INDEX
NAME=
"useridfrom"
UNIQUE=
"false"
FIELDS=
"useridfrom"
/>
<INDEX
NAME=
"useridto"
UNIQUE=
"false"
FIELDS=
"useridto"
/>
<INDEX
NAME=
"notificationtimeread"
UNIQUE=
"false"
FIELDS=
"notification, timeread"
/>
</INDEXES>
</TABLE>
<TABLE
NAME=
"message_contacts"
COMMENT=
"Maintains lists of relationships between users"
>
...
...
lib/db/upgrade.php
View file @
3262330d
...
...
@@ -4151,5 +4151,20 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint
(
true
,
2014111007.07
);
}
if
(
$oldversion
<
2014111008.03
)
{
// Define index notification (not unique) to be added to message_read.
$table
=
new
xmldb_table
(
'message_read'
);
$index
=
new
xmldb_index
(
'notificationtimeread'
,
XMLDB_INDEX_NOTUNIQUE
,
array
(
'notification'
,
'timeread'
));
// Conditionally launch add index notification.
if
(
!
$dbman
->
index_exists
(
$table
,
$index
))
{
$dbman
->
add_index
(
$table
,
$index
);
}
// Main savepoint reached.
upgrade_main_savepoint
(
true
,
2014111008.03
);
}
return
true
;
}
version.php
View file @
3262330d
...
...
@@ -29,7 +29,7 @@
defined
(
'MOODLE_INTERNAL'
)
||
die
();
$version
=
2014111008.0
2
;
// 20141110 = branching date YYYYMMDD - do not modify!
$version
=
2014111008.0
3
;
// 20141110 = branching date YYYYMMDD - do not modify!
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment