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