Skip to content

Commit

Permalink
Use symbol form of index name
Browse files Browse the repository at this point in the history
All the other indexes that use an explicit (non-generated) name use
symbols, except this one. This is for consistency. I've tested
that a version of this gem that includes this change, generates the Good
Jobs migration, and that the migration applies as expected.
  • Loading branch information
andyatkinson committed Dec 8, 2023
1 parent 294e510 commit e891506
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class CreateGoodJobs < ActiveRecord::Migration<%= migration_version %>
t.index :key, unique: true
end

add_index :good_jobs, :scheduled_at, where: "(finished_at IS NULL)", name: "index_good_jobs_on_scheduled_at"
add_index :good_jobs, :scheduled_at, where: "(finished_at IS NULL)", name: :index_good_jobs_on_scheduled_at
add_index :good_jobs, [:queue_name, :scheduled_at], where: "(finished_at IS NULL)", name: :index_good_jobs_on_queue_name_and_scheduled_at
add_index :good_jobs, [:active_job_id, :created_at], name: :index_good_jobs_on_active_job_id_and_created_at
add_index :good_jobs, :concurrency_key, where: "(finished_at IS NULL)", name: :index_good_jobs_on_concurrency_key_when_unfinished
Expand Down

0 comments on commit e891506

Please sign in to comment.