about summary refs log tree commit diff
path: root/db/migrate/20190724175247_add_public_index_to_statuses.rb
blob: 1c70260b41e2890a2c0865cb0f9993e2db323980 (plain) (blame)
1
2
3
4
5
6
class AddPublicIndexToStatuses < ActiveRecord::Migration[5.2]
  disable_ddl_transaction!
  def change
    add_index :statuses, [:account_id, :id, :visibility], where: 'visibility IN (0, 1, 2, 4)', order: { id: :desc }, algorithm: :concurrently
  end
end