Commit 1ed19970 authored by jplang's avatar jplang

Don't pass conditions to #delete_all.

git-svn-id: https://svn.redmine.org/redmine/trunk@15662 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent b48efc03
...@@ -820,11 +820,11 @@ class User < Principal ...@@ -820,11 +820,11 @@ class User < Principal
Message.where(['author_id = ?', id]).update_all(['author_id = ?', substitute.id]) Message.where(['author_id = ?', id]).update_all(['author_id = ?', substitute.id])
News.where(['author_id = ?', id]).update_all(['author_id = ?', substitute.id]) News.where(['author_id = ?', id]).update_all(['author_id = ?', substitute.id])
# Remove private queries and keep public ones # Remove private queries and keep public ones
::Query.delete_all ['user_id = ? AND visibility = ?', id, ::Query::VISIBILITY_PRIVATE] ::Query.where('user_id = ? AND visibility = ?', id, ::Query::VISIBILITY_PRIVATE).delete_all
::Query.where(['user_id = ?', id]).update_all(['user_id = ?', substitute.id]) ::Query.where(['user_id = ?', id]).update_all(['user_id = ?', substitute.id])
TimeEntry.where(['user_id = ?', id]).update_all(['user_id = ?', substitute.id]) TimeEntry.where(['user_id = ?', id]).update_all(['user_id = ?', substitute.id])
Token.delete_all ['user_id = ?', id] Token.where('user_id = ?', id).delete_all
Watcher.delete_all ['user_id = ?', id] Watcher.where('user_id = ?', id).delete_all
WikiContent.where(['author_id = ?', id]).update_all(['author_id = ?', substitute.id]) WikiContent.where(['author_id = ?', id]).update_all(['author_id = ?', substitute.id])
WikiContent::Version.where(['author_id = ?', id]).update_all(['author_id = ?', substitute.id]) WikiContent::Version.where(['author_id = ?', id]).update_all(['author_id = ?', substitute.id])
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment