socialforge/db/migrate/20150519012744_create_homew...

21 lines
419 B
Ruby

class CreateHomeworkCommons < ActiveRecord::Migration
def up
create_table :homework_commons do |t|
t.string :name
t.integer :user_id
t.text :description
t.date :publish_time
t.date :end_time
t.integer :homework_type, default: 1
t.string :late_penalty
t.integer :course_id
t.timestamps
end
end
def down
drop_table :homework_commons
end
end