Commit c7cf0952364488811cdc5f6fb77e8785c12d024c
1 parent
d35a9ac0
Exists in
master
and in
1 other branch
xmpp migration for seemless update
Showing
1 changed file
with
17 additions
and
0 deletions
Show diff stats
db/migrate/20130208135718_allow_custom_xmpp_on_gtalk.rb.rb
0 → 100644
| ... | ... | @@ -0,0 +1,17 @@ |
| 1 | +class AllowCustomXmppOnGtalk < Mongoid::Migration | |
| 2 | + def self.up | |
| 3 | + App.all.each do |app| | |
| 4 | + if app.notification_service and app.notification_service._type.include?("Gtalk") | |
| 5 | + user_id = app.notification_service.room_id | |
| 6 | + app.notification_service.update_attributes(:service => 'talk.google.com', | |
| 7 | + :service_url => "http://www.google.com/talk/", | |
| 8 | + :user_id => user_id, | |
| 9 | + :room_id => nil) | |
| 10 | + | |
| 11 | + end | |
| 12 | + end | |
| 13 | + end | |
| 14 | + | |
| 15 | + def self.down | |
| 16 | + end | |
| 17 | +end | ... | ... |