class IndexJobDate < ActiveRecord::Migration[4.2]
  disable_ddl_transaction!

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

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