Commit 12765b8d8097cca91d03e0a251c7ffe894431081

Authored by Vasiliy Ermolovich
2 parents ccdd2c52 8696af0a
Exists in master and in 1 other branch production

Merge pull request #237 from concordia-publishing-house/fix-migrations

don't break when running all migrations if using a newer Errbit
db/migrate/20110422152027_move_notices_to_separate_collection.rb
... ... @@ -5,6 +5,10 @@ class MoveNoticesToSeparateCollection < Mongoid::Migration
5 5 errs = mongo_db.collection("errs").find({ }, :fields => ["notices"])
6 6 errs.each do |err|
7 7 next unless err['notices']
  8 +
  9 + # This Err was created after the Problem->Err->Notice redesign
  10 + next if err['app_id'].nil? or err['problem_id']
  11 +
8 12 e = Err.find(err['_id'])
9 13 # disable email notifications
10 14 old_notify = e.app.notify_on_errs?
... ...