You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
419 B

  1. class RemoveOldReblogIndexOnStatuses < ActiveRecord::Migration[5.1]
  2. disable_ddl_transaction!
  3. def up
  4. # This index may not exists (see migration 20171122120436)
  5. remove_index :statuses, [:account_id, :reblog_of_id] if index_exists?(:statuses, [:account_id, :reblog_of_id])
  6. remove_index :statuses, :reblog_of_id
  7. end
  8. def down
  9. add_index :statuses, :reblog_of_id, algorithm: :concurrently
  10. end
  11. end