mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-16 06:06:56 +08:00
9 lines
299 B
Ruby
9 lines
299 B
Ruby
class FixNotificationMigration < ActiveRecord::Migration[7.0]
|
|
def up
|
|
Notification.find_each do |notification|
|
|
parsed_params = JSON.parse(notification.params)
|
|
parsed_params.delete('_aj_symbol_keys')
|
|
notification.update!(params: parsed_params.symbolize_keys)
|
|
end
|
|
end
|
|
end
|