1
0
mirror of https://github.com/mastodon/mastodon synced 2024-12-25 20:18:13 +09:00
mastodon/db/migrate/20170507141759_optimize_index_subscriptions.rb

12 lines
371 B
Ruby
Raw Normal View History

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