Skip to content

Instantly share code, notes, and snippets.

@tom-lord
Created October 12, 2018 13:24
Show Gist options
  • Save tom-lord/3c0b21e3707c04287a7a138f344a5a6f to your computer and use it in GitHub Desktop.
Save tom-lord/3c0b21e3707c04287a7a138f344a5a6f to your computer and use it in GitHub Desktop.
class AddPartialIndexOnDealershipIdAndExpiredAtToLeaseDeals < ActiveRecord::Migration[5.2]
def change
add_index :lease_deals, %i[dealership_id expired_at], where: 'expired_at IS NULL', algorithm: :concurrently
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment