From bb1c1a0bb01470c44160de4268c628e184565c66 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 27 Nov 2014 16:14:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E4=BD=9C=E4=B8=9A=E8=AF=84=E5=88=86=E5=B1=85=E7=84=B6?= =?UTF-8?q?=E6=98=AF6=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20141127072548_update_student_score.rb | 9 +++++++++ db/schema.rb | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20141127072548_update_student_score.rb diff --git a/db/migrate/20141127072548_update_student_score.rb b/db/migrate/20141127072548_update_student_score.rb new file mode 100644 index 000000000..615e33541 --- /dev/null +++ b/db/migrate/20141127072548_update_student_score.rb @@ -0,0 +1,9 @@ +class UpdateStudentScore < ActiveRecord::Migration + def up + sql = ActiveRecord::Base.connection() + sql.update_sql("update seems_rateable_rates set stars = 5 where stars > 5") + end + + def down + end +end diff --git a/db/schema.rb b/db/schema.rb index 973e2afbe..4baec2343 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 => 20141120091234) do +ActiveRecord::Schema.define(:version => 20141127072548) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false