add index on services for [type, uid]
This commit is contained in:
parent
7f6104d27b
commit
2cc261e938
2 changed files with 11 additions and 1 deletions
9
db/migrate/20110907205720_add_indexes_to_serivces.rb
Normal file
9
db/migrate/20110907205720_add_indexes_to_serivces.rb
Normal 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
|
||||||
|
|
@ -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|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue