20160905150353_create_media_attachments.rb 589 B

12345678910111213141516171819202122
  1. # frozen_string_literal: true
  2. class CreateMediaAttachments < ActiveRecord::Migration[5.0]
  3. def change
  4. create_table :media_attachments do |t|
  5. t.integer :status_id, null: true, default: nil
  6. # The following corresponds to `t.attachment :file` in an older version of Paperclip
  7. t.string :file_file_name
  8. t.string :file_content_type
  9. t.integer :file_file_size
  10. t.datetime :file_updated_at
  11. t.string :remote_url, null: false, default: ''
  12. t.integer :account_id
  13. t.timestamps
  14. end
  15. add_index :media_attachments, :status_id
  16. end
  17. end