Commit 24e4fe69ba0a5da87fefbc6379818056e9f0e196

Authored by Marcin Ciunelis
1 parent a8159438
Exists in master and in 1 other branch production

add ExtractBacktraces migration

Showing 1 changed file with 13 additions and 0 deletions   Show diff stats
db/migrate/20121003223358_extract_backtraces.rb 0 → 100644
... ... @@ -0,0 +1,13 @@
  1 +class ExtractBacktraces < Mongoid::Migration
  2 + def self.up
  3 + Notice.unscoped.all.each do |notice|
  4 + backtrace = Backtrace.find_or_create(:raw => notice['backtrace'])
  5 + notice.backtrace = backtrace
  6 + notice['backtrace'] = nil
  7 + notice.save!
  8 + end
  9 + end
  10 +
  11 + def self.down
  12 + end
  13 +end
... ...