metamaps--metamaps/db/migrate/20170122201451_create_attachments.rb
Devin Howard 696ff396b0 file attachments in db (re: #124) (#1043)
* file attachments in db

* rubocop

* factor out a bunch of file types

* thumb and medium image styles"

* syntax error in concern

* markdown is also plaintext

* rubocop
2017-01-24 15:10:40 -05:00

13 lines
294 B
Ruby

class CreateAttachments < ActiveRecord::Migration[5.0]
def change
create_table :attachments do |t|
t.references :attachable, polymorphic: true
t.attachment :file
t.timestamps
end
remove_attachment :topics, :image
remove_attachment :topics, :audio
end
end