mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 19:48:28 +02:00
Binding interface for bank statements
This commit is contained in:
parent
2dfa65645b
commit
851e5368eb
15 changed files with 113 additions and 26 deletions
10
db/migrate/20150415075408_fix_account_balances_to_decimal.rb
Normal file
10
db/migrate/20150415075408_fix_account_balances_to_decimal.rb
Normal file
|
@ -0,0 +1,10 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue