2015-05-19 10:36:30 +08:00
|
|
|
class CreateStudentWorks < ActiveRecord::Migration
|
2015-05-21 10:54:02 +08:00
|
|
|
def up
|
2015-05-19 10:36:30 +08:00
|
|
|
create_table :student_works do |t|
|
|
|
|
t.string :name
|
|
|
|
t.text :description
|
|
|
|
t.integer :homework_common_id
|
|
|
|
t.integer :user_id
|
2015-05-27 17:32:14 +08:00
|
|
|
t.float :final_score
|
|
|
|
t.float :teacher_score
|
|
|
|
t.float :student_score
|
|
|
|
t.float :teaching_asistant_score
|
2015-05-21 10:54:02 +08:00
|
|
|
t.integer :project_id, default: 0
|
2015-05-19 10:36:30 +08:00
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
end
|
2015-05-21 10:54:02 +08:00
|
|
|
|
|
|
|
def down
|
|
|
|
drop_table :student_works
|
|
|
|
end
|
2015-05-19 10:36:30 +08:00
|
|
|
end
|