Commit df54a6972c552d0284b2a2707841d2a1be657e57
1 parent
42d08538
Exists in
master
and in
1 other branch
Fix environment value of problem with invalid problem already save
See #557
Showing
1 changed file
with
6 additions
and
0 deletions
Show diff stats
db/migrate/20110422152027_move_notices_to_separate_collection.rb
... | ... | @@ -20,6 +20,12 @@ class MoveNoticesToSeparateCollection < Mongoid::Migration |
20 | 20 | e.app.update_attribute(:notify_on_errs, old_notify) |
21 | 21 | mongo_db.collection("errs").update({ "_id" => err['_id']}, { "$unset" => { "notices" => 1}}) |
22 | 22 | end |
23 | + Problem.where(:environment => '').each {|pr| | |
24 | + pr.update_attributes(:environment => 'old') | |
25 | + } | |
26 | + Problem.where(:environment => nil).each {|pr| | |
27 | + pr.update_attributes(:environment => 'old') | |
28 | + } | |
23 | 29 | Rake::Task["errbit:db:update_notices_count"].invoke |
24 | 30 | Rake::Task["errbit:db:update_problem_attrs"].invoke |
25 | 31 | end | ... | ... |