mirror of
https://github.com/we-promise/sure.git
synced 2026-04-18 03:24:09 +00:00
* Changing trades.price to have a larger scale - a scale of 4 causes destructive rounding when calculating transaction cost; changes to the UI to allow for inputting and showing increased scale trade prices; test case
10 lines
241 B
Ruby
10 lines
241 B
Ruby
class IncreaseTradePricePrecision < ActiveRecord::Migration[7.2]
|
|
def up
|
|
change_column :trades, :price, :decimal, precision: 19, scale: 10
|
|
end
|
|
|
|
def down
|
|
change_column :trades, :price, :decimal, precision: 19, scale: 4
|
|
end
|
|
end
|