20180510230049_migrate_web_push_subscriptions.rb 427 B

123456789101112131415
  1. # frozen_string_literal: true
  2. class MigrateWebPushSubscriptions < ActiveRecord::Migration[5.2]
  3. disable_ddl_transaction!
  4. def up
  5. add_index :web_push_subscriptions, :user_id, algorithm: :concurrently
  6. add_index :web_push_subscriptions, :access_token_id, algorithm: :concurrently
  7. end
  8. def down
  9. remove_index :web_push_subscriptions, :user_id
  10. remove_index :web_push_subscriptions, :access_token_id
  11. end
  12. end