Commit c746513ab7f3ccc17519627f2bca121fdd418c46
Exists in
master
and in
1 other branch
Merge pull request #541 from skorth/master
Fix issue #538
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
db/migrate/20121003223358_extract_backtraces.rb
| ... | ... | @@ -2,6 +2,7 @@ class ExtractBacktraces < Mongoid::Migration |
| 2 | 2 | def self.up |
| 3 | 3 | say "It could take long time (hours if you have many Notices)" |
| 4 | 4 | Notice.unscoped.all.each do |notice| |
| 5 | + next if notice.backtrace.present? || notice['backtrace'].nil? | |
| 5 | 6 | backtrace = Backtrace.find_or_create(:raw => notice['backtrace'] || []) |
| 6 | 7 | notice.backtrace = backtrace |
| 7 | 8 | notice['backtrace'] = nil |
| ... | ... | @@ -12,4 +13,4 @@ class ExtractBacktraces < Mongoid::Migration |
| 12 | 13 | |
| 13 | 14 | def self.down |
| 14 | 15 | end |
| 15 | 16 | -end |
| 17 | +end | |
| 16 | 18 | \ No newline at end of file | ... | ... |