add created_at to the page_views index on account_id

Change-Id: I2a23a1f5416eae7523260b963fa80b64c30b07b2
Reviewed-on: https://gerrit.instructure.com/2729
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
This commit is contained in:
Zach Wily 2011-03-21 16:27:49 -06:00
parent 988ca1af46
commit 23dfd541a4
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
class AddCreatedAtToPageViewsIndex < ActiveRecord::Migration
def self.up
remove_index :page_views, :column => :account_id
add_index :page_views, [ :account_id, :created_at ]
end
def self.down
remove_index :page_views, :column => [ :account_id, :created_at ]
add_index :page_views, :account_id
end
end