Set notification target type after importing

This commit is contained in:
Raphael 2011-01-10 17:07:16 -08:00
parent f1e8b5c01d
commit 30f98aec3c

View file

@ -428,6 +428,12 @@ module DataConversion
SET #{boolean_set("unread")};
SQL
log "Finished. Imported #{Mongo::Notification.count} notifications."
{"new_request" => "Request",
"request_accepted" => "Contact",
"comment_on_post" => "Comment",
"also_commented" => "Comment"}.each_pair do |key, value|
Mongo::Notification.where(:action => key).update_all(:target_type => value)
end
end
def import_raw_people
log "Loading people file..."