Merge pull request #3093 from stevenh512/db-indexes-rebased

DB Indexes
This commit is contained in:
Steven Hancock 2012-04-01 19:35:01 -07:00
commit e2e93e8742
3 changed files with 16 additions and 1 deletions

View file

@ -0,0 +1,6 @@
class IndexesOnParticipation < ActiveRecord::Migration
def change
add_index(:participations, [:target_id, :target_type, :author_id])
add_index(:participations, :guid)
end
end

View file

@ -0,0 +1,5 @@
class IndexesOnPosts < ActiveRecord::Migration
def change
add_index(:posts, [:id, :type, :created_at])
end
end

View file

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20120328025842) do
ActiveRecord::Schema.define(:version => 20120330144057) do
create_table "account_deletions", :force => true do |t|
t.string "diaspora_handle"
@ -262,6 +262,9 @@ ActiveRecord::Schema.define(:version => 20120328025842) do
t.datetime "updated_at"
end
add_index "participations", ["guid"], :name => "index_participations_on_guid"
add_index "participations", ["target_id", "target_type", "author_id"], :name => "index_participations_on_target_id_and_target_type_and_author_id"
create_table "people", :force => true do |t|
t.string "guid", :null => false
t.text "url", :null => false
@ -340,6 +343,7 @@ ActiveRecord::Schema.define(:version => 20120328025842) do
add_index "posts", ["author_id", "root_guid"], :name => "index_posts_on_author_id_and_root_guid", :unique => true
add_index "posts", ["author_id"], :name => "index_posts_on_person_id"
add_index "posts", ["guid"], :name => "index_posts_on_guid", :unique => true
add_index "posts", ["id", "type", "created_at"], :name => "index_posts_on_id_and_type_and_created_at"
add_index "posts", ["root_guid"], :name => "index_posts_on_root_guid"
add_index "posts", ["status_message_guid", "pending"], :name => "index_posts_on_status_message_guid_and_pending"
add_index "posts", ["status_message_guid"], :name => "index_posts_on_status_message_guid"