From 0b0f484a5b1f623cf4443a345eb9fd7d777760e2 Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 29 Mar 2016 09:50:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=90=B4=E6=96=87=E6=A4=8D?= =?UTF-8?q?=E7=9A=84=E5=88=86=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...29014316_update_one_student_teacher_score.rb | 17 +++++++++++++++++ db/schema.rb | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20160329014316_update_one_student_teacher_score.rb diff --git a/db/migrate/20160329014316_update_one_student_teacher_score.rb b/db/migrate/20160329014316_update_one_student_teacher_score.rb new file mode 100644 index 000000000..cf56db220 --- /dev/null +++ b/db/migrate/20160329014316_update_one_student_teacher_score.rb @@ -0,0 +1,17 @@ +class UpdateOneStudentTeacherScore < ActiveRecord::Migration + def up + work = StudentWork.find 49774 + score = StudentWorksScore.new + score.score = 100 + score.user_id = 7318 + score.student_work_id = work.id + score.reviewer_role = 1 + if score.save + work.teacher_score = score.score + end + work.save + end + + def down + end +end diff --git a/db/schema.rb b/db/schema.rb index aeabe0ae0..28931468b 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20160325030423) do +ActiveRecord::Schema.define(:version => 20160329014316) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false