mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
10 lines
245 B
Ruby
10 lines
245 B
Ruby
class FixAccountBalancesToDecimal < ActiveRecord::Migration
|
|
def change
|
|
Account.all.each do |x|
|
|
x.balance = 0.0 unless x.balance
|
|
x.save
|
|
end
|
|
|
|
change_column :accounts, :balance, :decimal, null: false, default: 0
|
|
end
|
|
end
|