Initial commit
This commit is contained in:
14
db/migrate/20180905112301_remove_fields_from_currenices.rb
Normal file
14
db/migrate/20180905112301_remove_fields_from_currenices.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
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
|
||||
Reference in New Issue
Block a user