foodsoft/db/migrate/20160220000000_create_documents.foodsoft_documents_engine.rb

16 lines
302 B
Ruby
Raw Normal View History

2017-10-11 10:18:26 +02:00
class CreateDocuments < ActiveRecord::Migration
def self.up
create_table :documents do |t|
t.string :name
t.string :mime
t.binary :data, limit: 16.megabyte
t.integer :created_by_user_id
t.timestamps
end
end
def self.down
drop_table :documents
end
end