logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

20170507141759_optimize_index_subscriptions.rb (371B)


  1. class OptimizeIndexSubscriptions < ActiveRecord::Migration[5.0]
  2. def up
  3. add_index :subscriptions, [:account_id, :callback_url], unique: true
  4. remove_index :subscriptions, [:callback_url, :account_id]
  5. end
  6. def down
  7. add_index :subscriptions, [:callback_url, :account_id], unique: true
  8. remove_index :subscriptions, [:account_id, :callback_url]
  9. end
  10. end