20200617153806_issue_3087_search_taskbar_deadlock.rb 351 B

1234567891011121314
  1. class Issue3087SearchTaskbarDeadlock < ActiveRecord::Migration[5.2]
  2. def change
  3. Taskbar.where(key: 'Search').find_each do |taskbar|
  4. next if taskbar.preferences.blank?
  5. next if taskbar.preferences[:tasks].blank?
  6. taskbar.preferences.delete(:tasks)
  7. taskbar.save!
  8. rescue => e
  9. Rails.logger.error e
  10. end
  11. end
  12. end