From e5ebfb84d03b8aacb8356ac524c70df3d3b3fbdc Mon Sep 17 00:00:00 2001 From: Muhammad Nawzad Date: Tue, 2 Apr 2024 14:50:42 +0300 Subject: [PATCH] Add index on outboxes table for status and last_attempted_at --- lib/templates/create_outboxable_outboxes.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/templates/create_outboxable_outboxes.rb b/lib/templates/create_outboxable_outboxes.rb index 800acdb..474ada0 100644 --- a/lib/templates/create_outboxable_outboxes.rb +++ b/lib/templates/create_outboxable_outboxes.rb @@ -21,5 +21,7 @@ def change t.timestamps end + + add_index :outboxes, %i[status last_attempted_at], name: 'index_outboxes_on_outboxable_status_and_last_attempted_at' end end