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:
parent
1457ecf4ed
commit
e1194404fb
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue