add index on report snapshots

refs CNVS-5180

Change-Id: I57bb1e049af086fff2d943ec3c70ccb726d11883
Reviewed-on: https://gerrit.instructure.com/26030
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
Cody Cutrer 2013-11-06 09:20:05 -07:00
parent 0f23818a30
commit 82952384d2
1 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
class AddReportSnapshotsIndex < ActiveRecord::Migration
tag :postdeploy
disable_ddl_transaction!
def self.up
add_index :report_snapshots, [:report_type, :account_id, :created_at], algorithm: :concurrently, name: 'index_on_report_snapshots'
end
def self.down
remove_index :report_snapshots, name: 'index_on_report_snapshots'
end
end