mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-05 13:35:21 +02:00
Multi-currency support (#425)
* Initial foundational pass at multi-currency * Default format currency * More work on currency and exchanging * Re-build currencies on change * Currency import/setup * Background job overhaul + cheaper OXR plan support * Lint fixes * Test fixes * Multi-currency setup instructions * Allow decimals in the balance field * Spacing fix for form --------- Signed-off-by: Josh Pigford <josh@joshpigford.com>
This commit is contained in:
parent
94f7b4ea8f
commit
aa351ae616
41 changed files with 634 additions and 176 deletions
12
db/migrate/20240209174912_redo_money_storage.rb
Normal file
12
db/migrate/20240209174912_redo_money_storage.rb
Normal file
|
@ -0,0 +1,12 @@
|
|||
class RedoMoneyStorage < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
add_column :accounts, :original_balance, :decimal, precision: 19, scale: 4, default: 0.0
|
||||
add_column :accounts, :original_currency, :string, default: "USD"
|
||||
add_column :accounts, :converted_balance, :decimal, precision: 19, scale: 4, default: 0.0
|
||||
add_column :accounts, :converted_currency, :string, default: "USD"
|
||||
|
||||
remove_column :accounts, :balance_cents
|
||||
remove_column :accounts, :balance_currency
|
||||
remove_column :accounts, :currency
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue