Skip to content

Commit

Permalink
add index for pending delayed_messages
Browse files Browse the repository at this point in the history
Change-Id: Idef832087d9194eae9c782d5f67bd76a66629703
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/230983
Tested-by: Service Cloud Jenkins <[email protected]>
Reviewed-by: Simon Williams <[email protected]>
Reviewed-by: Jeremy Stanley <[email protected]>
Reviewed-by: Cody Cutrer <[email protected]>
QA-Review: Cody Cutrer <[email protected]>
Product-Review: Cody Cutrer <[email protected]>
  • Loading branch information
maneframe committed Mar 23, 2020
1 parent be33585 commit 127e5bc
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class AddPendingDelayedMessagesIndex < ActiveRecord::Migration[5.2]
tag :postdeploy
disable_ddl_transaction!

def change
add_index :delayed_messages, [:send_at], where: "workflow_state = 'pending'",
name: "index_delayed_messages_pending", algorithm: :concurrently
end
end

0 comments on commit 127e5bc

Please sign in to comment.