parent
098d38e356
commit
cb48035505
@ -0,0 +1,11 @@
|
||||
class MigrateUserLocation < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
UserExtension.where("location like '%省'").each do |ue|
|
||||
ue.update_column("location", ue.location.chop)
|
||||
end
|
||||
|
||||
UserExtension.where("location_city like '%市'").each do |ue|
|
||||
ue.update_column("location_city", ue.location_city.chop)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in new issue