Added indexes.
This commit is contained in:
parent
876109258f
commit
58e5defe91
1 changed files with 12 additions and 0 deletions
12
db/migrate/20150616224717_add_base_indexes.rb
Normal file
12
db/migrate/20150616224717_add_base_indexes.rb
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
class AddBaseIndexes < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_index :users, [:organization_id]
|
||||||
|
add_index :roles_users, [:user_id]
|
||||||
|
add_index :roles_users, [:role_id]
|
||||||
|
add_index :groups_users, [:user_id]
|
||||||
|
add_index :groups_users, [:group_id]
|
||||||
|
add_index :organizations_users, [:user_id]
|
||||||
|
add_index :organizations_users, [:organization_id]
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue