about summary refs log tree commit diff
path: root/db/post_migrate/20190728084117_remove_uri_from_conversations.rb
blob: b2b157ef7c3d556c907d53408e8b04969d8b828f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
# frozen_string_literal: true

class RemoveUriFromConversations < ActiveRecord::Migration[5.2]
  def up
    safety_assured { remove_column :conversations, :uri, :string }
  end

  def down
    add_column :conversations, :uri, :string
    add_index :conversations, :uri, unique: true
  end
end