|
|
@ -1,5 +1,6 @@
|
|
|
|
class UpdateOneStudentTeacherScore < ActiveRecord::Migration
|
|
|
|
class UpdateOneStudentTeacherScore < ActiveRecord::Migration
|
|
|
|
def up
|
|
|
|
def up
|
|
|
|
|
|
|
|
begin
|
|
|
|
work = StudentWork.find 49774
|
|
|
|
work = StudentWork.find 49774
|
|
|
|
score = StudentWorksScore.new
|
|
|
|
score = StudentWorksScore.new
|
|
|
|
score.score = 100
|
|
|
|
score.score = 100
|
|
|
@ -10,6 +11,9 @@ class UpdateOneStudentTeacherScore < ActiveRecord::Migration
|
|
|
|
work.teacher_score = score.score
|
|
|
|
work.teacher_score = score.score
|
|
|
|
end
|
|
|
|
end
|
|
|
|
work.save
|
|
|
|
work.save
|
|
|
|
|
|
|
|
rescue => e
|
|
|
|
|
|
|
|
logger.error "[Errno::ENOENT] ===> #{e}"
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def down
|
|
|
|
def down
|
|
|
|