mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 14:05:37 +08:00
2f6a4cc6de
interestingly there was some left over dead code from when stars existed in the topic_users table
16 lines
594 B
Ruby
16 lines
594 B
Ruby
desc "rebuild the user_actions table"
|
|
task "user_actions:rebuild" => :environment do
|
|
MessageBus.off
|
|
UserAction.delete_all
|
|
PostAction.all.each{|i| UserActionCreator.log_post_action(i)}
|
|
Topic.all.each {|i| UserActionCreator.log_topic(i)}
|
|
Post.all.each {|i| UserActionCreator.log_post(i)}
|
|
Notification.all.each do |notification|
|
|
UserActionCreator.log_notification(notification.post,
|
|
notification.user,
|
|
notification.notification_type,
|
|
notification.user)
|
|
end
|
|
end
|
|
|