mirror of
https://github.com/mastodon/mastodon
synced 2024-11-27 22:38:27 +09:00
14 lines
402 B
Ruby
14 lines
402 B
Ruby
# 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
|