This repository has been archived on 2024-06-09. You can view files and clone it, but cannot push or open issues/pull-requests.
2023-07-12 09:47:08 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-05-07 19:00:20 +02:00
|
|
|
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
|