From 718f08a568c1df54ff3ac9d46deee13a09685495 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 26 Jul 2019 18:31:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E6=B5=8B=E8=AF=95=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E9=AB=98=E6=A0=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20190726101533_modify_test_user_for_school.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20190726101533_modify_test_user_for_school.rb b/db/migrate/20190726101533_modify_test_user_for_school.rb index f2ecc3e7..2b9d4f43 100644 --- a/db/migrate/20190726101533_modify_test_user_for_school.rb +++ b/db/migrate/20190726101533_modify_test_user_for_school.rb @@ -1,6 +1,6 @@ class ModifyTestUserForSchool < ActiveRecord::Migration def up - school_ids = School.pluck(:id) + school_ids = School.where("id < 1500").pluck(:id) users = User.where(is_test: true).includes(:user_extensions) users.find_each do |u| school_id = school_ids.sample