Commit 3b2d3805 authored by Jorrit's avatar Jorrit

Add an index to improve speed of og_roles()

parent 8761944d
......@@ -169,6 +169,9 @@ function og_schema() {
),
),
'primary key' => array('rid'),
'indexes' => array(
'lookup' => array('group_type', 'group_bundle', 'gid'),
),
);
$schema['og_users_roles'] = array(
......@@ -1187,3 +1190,10 @@ function og_update_7204() {
function og_update_7205() {
db_add_index('og_membership', 'group_type', array('group_type'));
}
/**
* Add an index to {og_role} on group_type, group_bundle and gid to improve speed of og_roles().
*/
function og_update_7206() {
db_add_index('og_role', 'lookup', array('group_type', 'group_bundle', 'gid'));
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment