Add compound index to post_visibilities
This commit is contained in:
parent
b43c29745b
commit
dd3f8f4bee
2 changed files with 11 additions and 1 deletions
|
|
@ -0,0 +1,9 @@
|
|||
class AddIndexToPostVisibilities < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_index :post_visibilities, [:aspect_id, :post_id]
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :post_visibilities, [:aspect_id, :post_id]
|
||||
end
|
||||
end
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20110105051803) do
|
||||
ActiveRecord::Schema.define(:version => 20110119060243) do
|
||||
|
||||
create_table "aspect_memberships", :force => true do |t|
|
||||
t.integer "aspect_id"
|
||||
|
|
@ -316,6 +316,7 @@ ActiveRecord::Schema.define(:version => 20110105051803) do
|
|||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
add_index "post_visibilities", ["aspect_id", "post_id"], :name => "index_post_visibilities_on_aspect_id_and_post_id"
|
||||
add_index "post_visibilities", ["aspect_id"], :name => "index_post_visibilities_on_aspect_id"
|
||||
add_index "post_visibilities", ["post_id"], :name => "index_post_visibilities_on_post_id"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue