school为0的情况数据迁移

This commit is contained in:
huang 2016-09-14 16:26:37 +08:00
parent 89de36ec65
commit de3fc8aa9f
1 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,9 @@
class UpdateUserExtensions < ActiveRecord::Migration
def up
ues = UserExtensions.where(:school_id => 0)
ues.update_all(:school_id => nil)
end
def down
end
end