db: add updated_at index on wiki pages.

The wiki pages sidebar is ordered by updated_at. The sidebar is present
on all wiki pages, so this improves load times for all wikis.
This commit is contained in:
evazion
2017-03-29 14:16:09 -05:00
parent 8376c33980
commit fcc5521f63
2 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
class AddUpdatedAtIndexOnWikiPages < ActiveRecord::Migration
def change
WikiPage.without_timeout do
add_index :wiki_pages, :updated_at
end
end
end