about summary refs log tree commit diff
path: root/db/migrate/20160905150353_create_media_attachments.rb
blob: 32d0897d864051c9f0c6a6bda1b2721948a4eed0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class CreateMediaAttachments < ActiveRecord::Migration[5.0]
  def change
    create_table :media_attachments do |t|
      t.integer :status_id, null: true, default: nil
      t.attachment :file
      t.string :remote_url, null: false, default: ''
      t.integer :account_id

      t.timestamps
    end

    add_index :media_attachments, :status_id
  end
end