This commit is contained in:
yuanke 2016-08-14 10:56:38 +08:00
parent 91a64a67c5
commit 6cea0bfb67
1 changed files with 6 additions and 6 deletions

View File

@ -17,10 +17,10 @@ class UserWechat < ActiveRecord::Base
## 主要是将comment 迁移 ## 主要是将comment 迁移
User.delete(old_user) User.delete(old_user)
JournalForMessages.where(user_id: old_user).update_all(user_id: u.id) Mobile::Apis.JournalForMessages.where(user_id: old_user).update_all(user_id: u.id)
Journal.where(user_id: old_user).update_all(user_id: u.id) Mobile::Apis.Journal.where(user_id: old_user).update_all(user_id: u.id)
Comment.where(author_id: old_user).update_all(author_id: u.id) Mobile::Apis.Comment.where(author_id: old_user).update_all(author_id: u.id)
Message.where(author_id: old_user).update_all(author_id: u.id) Mobile::Apis.Message.where(author_id: old_user).update_all(author_id: u.id)
BlogComment.where(author_id: old_user).update_all(author_id: u.id) Mobile::Apis.BlogComment.where(author_id: old_user).update_all(author_id: u.id)
end end
end end