Files
Dena/db/migrate/20180905112301_remove_fields_from_currenices.rb
2026-08-13 19:50:53 +03:30

15 lines
406 B
Ruby

class RemoveFieldsFromCurrenices < ActiveRecord::Migration[4.2]
class Ccy < ActiveRecord::Base
serialize :options, JSON
self.table_name = 'currencies'
self.inheritance_column = :disabled
end
def change
Ccy.where(type: :coin).find_each do |ccy|
ccy.update_columns \
options: ccy.options.except('supports_hd_protocol', 'allow_multiple_deposit_addresses')
end
end
end