about summary refs log tree commit diff
path: root/db/migrate/20200904002209_add_expires_at_to_statuses.rb
blob: 53049b1595de0b96538ae428e36d253e08512600 (plain) (blame)
1
2
3
4
5
6
7
8
class AddExpiresAtToStatuses < ActiveRecord::Migration[5.2]
  disable_ddl_transaction!

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