Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Create the the index on all four used fields for better performance

  • Loading branch information...
commit bfe33a38692b3ff18bca60aa54f0c7da8ea217ed 1 parent 53e2e14
Tanel Suurhans authored
2  lib/generators/acts_as_taggable_on/migration/templates/active_record/migration.rb
@@ -20,7 +20,7 @@ def self.up
20 20 end
21 21
22 22 add_index :taggings, :tag_id
23   - add_index :taggings, [:taggable_id, :taggable_type, :context]
  23 + add_index :taggings, [:taggable_id, :taggable_type, :tag_id, :context], :name => "index_taggings_on_keys"
24 24 end
25 25
26 26 def self.down

0 comments on commit bfe33a3

Please sign in to comment.
Something went wrong with that request. Please try again.