20170330164118_add_attachment_data_to_imports.rb 433 B

1234567891011121314151617
  1. # frozen_string_literal: true
  2. class AddAttachmentDataToImports < ActiveRecord::Migration[4.2]
  3. def up
  4. change_table :imports do |t|
  5. # The following corresponds to `t.attachment :data` in an older version of Paperclip
  6. t.string :data_file_name
  7. t.string :data_content_type
  8. t.integer :data_file_size
  9. t.datetime :data_updated_at
  10. end
  11. end
  12. def down
  13. remove_attachment :imports, :data
  14. end
  15. end