add a few useful indexes
These were found missing by watching the log of unindexed queries. Change-Id: I1823eeb5e5e7dfc4351ced92a5a354aac05d97eb Reviewed-on: https://gerrit.instructure.com/5261 Tested-by: Hudson <hudson@instructure.com> Reviewed-by: Jon Jensen <jon@instructure.com> Reviewed-by: Brian Palmer <brianp@instructure.com>
This commit is contained in:
parent
8fb11bd39c
commit
cffaa78cd9
|
@ -0,0 +1,17 @@
|
|||
class AddUsefulIndexes < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_index :courses, :uuid
|
||||
add_index :content_tags, [ :associated_asset_id, :associated_asset_type ], :name => 'index_content_tags_on_associated_asset'
|
||||
add_index :discussion_entries, :parent_id
|
||||
add_index :learning_outcomes, [ :context_id, :context_type ]
|
||||
add_index :role_overrides, :context_code
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :courses, :uuid
|
||||
remove_index :content_tags, :name => 'index_content_tags_on_associated_asset'
|
||||
remove_index :discussion_entries, :parent_id
|
||||
remove_index :learning_outcomes, [ :context_id, :context_type ]
|
||||
remove_index :role_overrides, :context_code
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue