Skip to content

Commit

Permalink
Merge pull request mbleigh#682 from ryanfox1985/master
Browse files Browse the repository at this point in the history
Added missed indexes.
  • Loading branch information
seuros committed Nov 11, 2015
2 parents 5d9fa33 + a5ecb4c commit d0b4a5d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions db/migrate/6_add_missing_indexes.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class AddMissingIndexes < ActiveRecord::Migration
def change
add_index :taggings, :tag_id
add_index :taggings, :taggable_id
add_index :taggings, :taggable_type
add_index :taggings, :tagger_id
add_index :taggings, :context

add_index :taggings, [:tagger_id, :tagger_type]
add_index :taggings, [:taggable_id, :taggable_type, :tagger_id, :context], name: 'taggings_idy'
end
end

0 comments on commit d0b4a5d

Please sign in to comment.