fix migation frd

Change-Id: Ibc842dd14b52a5b27342bb40fbc45b722c442f03
Reviewed-on: https://gerrit.instructure.com/145982
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Tested-by: Rob Orton <rob@instructure.com>
This commit is contained in:
Rob Orton 2018-04-04 17:29:20 -06:00
parent 1457ecf4ed
commit e1194404fb
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ class AddSubmissionDateIndex < ActiveRecord::Migration[5.1]
disable_ddl_transaction!
def change
return if index_exists? {name: 'index_submissions_on_user_and_greatest_dates'}
return if index_name_exists?(:submissions, 'index_submissions_on_user_and_greatest_dates')
add_index :submissions, "user_id, GREATEST(submitted_at, created_at)", name: "index_submissions_on_user_and_greatest_dates", algorithm: :concurrently
end
end