Class: IndexJobDate

Inherits:
Debci::DB::LEGACY_MIGRATION
  • Object
show all
Defined in:
lib/debci/db/migrations/20231214000000_index_job_date.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



4
5
6
7
8
9
# File 'lib/debci/db/migrations/20231214000000_index_job_date.rb', line 4

def change
  opts = { algorithm: :concurrently } if ActiveRecord::Base.connection.index_algorithms.has_key?(:concurrently)

  opts ||= {}
  add_index :jobs, :date, **opts
end