Add documents (merges foodcoops/foodsoft#353)
This commit is contained in:
parent
33c9b23e2f
commit
8bb58c5519
18 changed files with 310 additions and 0 deletions
|
|
@ -0,0 +1,15 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue