Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
class AddOrderedDealershipIdExpiredAtIndexToLeaseDeals < ActiveRecord::Migration[5.2]
def change
remove_index :lease_deals, name: :index_lease_deals_on_dealership_id_and_expired_at, algorithm: :concurrently
add_index :lease_deals, %i[id dealership_id expired_at], where: 'expired_at IS NULL', using: :btree, order: { id: :asc }, algorithm: :concurrently
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.