forked from diowa/icare
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
tagliala edited this page Dec 25, 2012
·
13 revisions
Welcome to the icare wiki!
User.all.each { |u| u.update_attribute :username_or_uid, [u.username, u.uid] }
User.all.each { |u| u.references.each { |r| r.set(:read_at, r.read); r.unset :read } }
Conversation.all.each { |c| c.messages.each { |m| m.set(:read_at, m.read); m.unset :read } }
run rake db:mongoid:create_indexes
too
User.all.each do |u|
u.references.all.each do |r|
r.set :incoming, r[:references_incoming] if r[:references_incoming]
r.set :outgoing, r[:references_outgoing] if r[:references_outgoing]
r.unset :references_incoming
r.unset :references_outgoing
end
end