You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
glitchier-soc/db/migrate/20170507141759_optimize_ind...

14 lines
402 B

# frozen_string_literal: true
class OptimizeIndexSubscriptions < ActiveRecord::Migration[5.0]
def up
add_index :subscriptions, [:account_id, :callback_url], unique: true
remove_index :subscriptions, [:callback_url, :account_id]
end
def down
add_index :subscriptions, [:callback_url, :account_id], unique: true
remove_index :subscriptions, [:account_id, :callback_url]
end
end