2015-05-19 09:49:26 +08:00
|
|
|
class CreateHomeworkCommons < ActiveRecord::Migration
|
2015-05-21 10:54:02 +08:00
|
|
|
def up
|
2015-05-19 09:49:26 +08:00
|
|
|
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
|
2015-05-21 10:54:02 +08:00
|
|
|
|
|
|
|
def down
|
|
|
|
drop_table :homework_commons
|
|
|
|
end
|
2015-05-19 09:49:26 +08:00
|
|
|
end
|