forked from diowa/icare
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
cesidio edited this page Mar 28, 2013
·
13 revisions
Welcome to the icare wiki!
Itinerary.all.each {|i| i.update_attributes(start_address: i[:title].split("-").first.strip, end_address: i[:title].split("-").last.strip); i.unset :title}
User.all.each { |u| u.update_attribute :username_or_uid, [u.username, u.uid] }
User.all.each { |u| u.rename :facebook_data_updated_at, :facebook_data_cached_at }
User.all.each { |u| u.unset :references }
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