Merge branch 'dev_aliyun' into educoder

dev_aliyun
daiao 5 years ago
commit d34c0afcf3

@ -1,6 +1,6 @@
class ModifyTestUserForSchool < ActiveRecord::Migration class ModifyTestUserForSchool < ActiveRecord::Migration
def up 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 = User.where(is_test: true).includes(:user_extensions)
users.find_each do |u| users.find_each do |u|
school_id = school_ids.sample school_id = school_ids.sample

Loading…
Cancel
Save