迁移测试用户高校

dev_aliyun
daiao 5 years ago
parent 679f0a5d81
commit 718f08a568

@ -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

Loading…
Cancel
Save