add index on services for [type, uid]

This commit is contained in:
danielgrippi 2011-09-07 14:00:24 -07:00
parent 7f6104d27b
commit 2cc261e938
2 changed files with 11 additions and 1 deletions

View file

@ -0,0 +1,9 @@
class AddIndexesToSerivces < ActiveRecord::Migration
def self.up
add_index :services, [:type, :uid]
end
def self.down
remove_index :services, :column => [:type, :uid]
end
end

View file

@ -10,7 +10,7 @@
# #
# It's strongly recommended to check this file into your version control system. # It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20110830170929) do ActiveRecord::Schema.define(:version => 20110907205720) do
create_table "aspect_memberships", :force => true do |t| create_table "aspect_memberships", :force => true do |t|
t.integer "aspect_id", :null => false t.integer "aspect_id", :null => false
@ -340,6 +340,7 @@ ActiveRecord::Schema.define(:version => 20110830170929) do
t.datetime "updated_at" t.datetime "updated_at"
end end
add_index "services", ["type", "uid"], :name => "index_services_on_type_and_uid"
add_index "services", ["user_id"], :name => "index_services_on_user_id" add_index "services", ["user_id"], :name => "index_services_on_user_id"
create_table "tag_followings", :force => true do |t| create_table "tag_followings", :force => true do |t|