2023-07-12 03:47:08 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-06-04 20:43:02 -04:00
|
|
|
class AddAttachmentAvatarToAccounts < ActiveRecord::Migration[4.2]
|
2024-06-21 10:43:12 -04:00
|
|
|
def up
|
2016-02-27 18:02:59 -05:00
|
|
|
change_table :accounts do |t|
|
2024-05-20 10:59:27 -04:00
|
|
|
# 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
|
2016-02-27 18:02:59 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2024-06-21 10:43:12 -04:00
|
|
|
def down
|
2016-02-27 18:02:59 -05:00
|
|
|
remove_attachment :accounts, :avatar
|
|
|
|
end
|
|
|
|
end
|