class AddIndexToVerificatiojnCodes < ActiveRecord::Migration[5.2]
  def change
    add_index :verification_codes, [:phone], name: 'by_phone' if !index_exists?(:verification_codes, :phone)
    add_index :verification_codes, [:email], name: 'by_email' if !index_exists?(:verification_codes, :email)
  end
end
