about summary refs log tree commit diff
path: root/db/migrate/20180510230049_migrate_web_push_subscriptions.rb
blob: 6de1bed795f32cda4c7ccc5b70e8fe2f3b983501 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
class MigrateWebPushSubscriptions < ActiveRecord::Migration[5.2]
  disable_ddl_transaction!

  def up
    add_index :web_push_subscriptions, :user_id, algorithm: :concurrently
    add_index :web_push_subscriptions, :access_token_id, algorithm: :concurrently
  end

  def down
    remove_index :web_push_subscriptions, :user_id
    remove_index :web_push_subscriptions, :access_token_id
  end
end