This commit is contained in:
parent
91a64a67c5
commit
6cea0bfb67
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue