20180510230049_migrate_web_push_subscriptions.rb 396 B

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