Commit 6a9f63109002bcc582d370437f2ed6514dfd7b85

Authored by Jesse Lewis
Committed by Robert Lail
1 parent 17c9c54f
Exists in master and in 1 other branch production

Migrated first_notice_at to Problem

db/migrate/20120822195841_set_first_notice_at_on_problems.rb 0 → 100644
... ... @@ -0,0 +1,10 @@
  1 +class SetFirstNoticeAtOnProblems < Mongoid::Migration
  2 + def self.up
  3 + Problem.all.each do |problem|
  4 + problem.update_attribute :first_notice_at, problem.notices.order_by([:created_at, :asc]).first.try(:created_at)
  5 + end
  6 + end
  7 +
  8 + def self.down
  9 + end
  10 +end
0 11 \ No newline at end of file
... ...