summaryrefslogtreecommitdiffstats
path: root/db/migrate/20160227230233_add_attachment_avatar_to_accounts.rb
blob: cfe4c23de3a8681cad082964535eadfd23a0fae7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

class AddAttachmentAvatarToAccounts < ActiveRecord::Migration[4.2]
  def up
    change_table :accounts do |t|
      # The following corresponds to `t.attachment :avatar` in an older version of Paperclip
      t.string :avatar_file_name
      t.string :avatar_content_type
      t.integer :avatar_file_size
      t.datetime :avatar_updated_at
    end
  end

  def down
    remove_attachment :accounts, :avatar
  end
end