Commit 55dc89bcc13e9278a24a6b48102be90b3469d952
Exists in
master
and in
29 other branches
Merge branch 'ai3197' into 'master'
Speed up role assignments fetch http://noosfero.org/Development/ActionItem3197 See merge request !252
Showing
1 changed file
with
15 additions
and
0 deletions
Show diff stats
db/migrate/20140708123314_index_role_assignments_filtered_fields.rb
0 → 100644
... | ... | @@ -0,0 +1,15 @@ |
1 | +class IndexRoleAssignmentsFilteredFields < ActiveRecord::Migration | |
2 | + | |
3 | + def self.up | |
4 | + add_index :role_assignments, [:accessor_id, :accessor_type] | |
5 | + add_index :role_assignments, [:accessor_id, :accessor_type, :role_id] | |
6 | + add_index :role_assignments, [:resource_id, :resource_type] | |
7 | + add_index :role_assignments, [:resource_id, :resource_type, :role_id] | |
8 | + add_index :role_assignments, [:accessor_id, :accessor_type, :resource_id, :resource_type] | |
9 | + add_index :profiles, [:type] | |
10 | + add_index :profiles, [:visible] | |
11 | + add_index :profiles, [:enabled] | |
12 | + add_index :profiles, [:validated] | |
13 | + end | |
14 | + | |
15 | +end | ... | ... |