about summary refs log tree commit diff
path: root/db/migrate/20200904004330_add_publish_at_to_statuses.rb
blob: 35a32eb0eda13d83f67ce486053241940479b7b9 (plain) (blame)
1
2
3
4
5
6
7
8
class AddPublishAtToStatuses < ActiveRecord::Migration[5.2]
  disable_ddl_transaction!

  def change
    add_column :statuses, :publish_at, :datetime
    add_index :statuses, :publish_at, algorithm: :concurrently, where: 'publish_at IS NOT NULL'
  end
end