From 29cff5349b81438d0812244f7b8084dd5c434ace Mon Sep 17 00:00:00 2001 From: daiao <35855898@qq.com> Date: Thu, 14 Mar 2019 16:08:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0=E8=BF=81=E7=A7=BB=E5=AE=9E?= =?UTF-8?q?=E8=AE=AD=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/games_service.rb | 4 ++-- ..._work.rb => 20190314080807_create_shixun_student_works.rb} | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename db/migrate/{20190314025104_migration_shixun_student_work.rb => 20190314080807_create_shixun_student_works.rb} (98%) diff --git a/app/services/games_service.rb b/app/services/games_service.rb index a7c77d70..e1d81137 100644 --- a/app/services/games_service.rb +++ b/app/services/games_service.rb @@ -91,9 +91,9 @@ class GamesService sql = if max_query_index > 0 "SELECT - b.actual_output, b.out_put, b.result, a.is_public, a.input + b.actual_output, b.out_put, b.result, a.is_public, a.input, a.output FROM - (SELECT position, input, challenge_id, is_public FROM test_sets where challenge_id=6000) a + (SELECT position, input, output, challenge_id, is_public FROM test_sets where challenge_id=6000) a LEFT JOIN (SELECT result, test_set_position, g.challenge_id, o.actual_output, o.out_put diff --git a/db/migrate/20190314025104_migration_shixun_student_work.rb b/db/migrate/20190314080807_create_shixun_student_works.rb similarity index 98% rename from db/migrate/20190314025104_migration_shixun_student_work.rb rename to db/migrate/20190314080807_create_shixun_student_works.rb index c6bd65a4..83bac6c7 100644 --- a/db/migrate/20190314025104_migration_shixun_student_work.rb +++ b/db/migrate/20190314080807_create_shixun_student_works.rb @@ -1,4 +1,4 @@ -class MigrationShixunStudentWork < ActiveRecord::Migration +class CreateShixunStudentWorks < ActiveRecord::Migration def up ActiveRecord::Base.transaction do begin