Files
sure/db/migrate/20250806155348_increase_trade_price_precision.rb
Michael Studman ea7ce13a7d Increasing trades.price decimal scale (#89)
* 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
2025-10-21 18:22:24 +02:00

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