20160905150353_create_media_attachments.rb 390 B

12345678910111213141516
  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. t.attachment :file
  7. t.string :remote_url, null: false, default: ''
  8. t.integer :account_id
  9. t.timestamps
  10. end
  11. add_index :media_attachments, :status_id
  12. end
  13. end