mirror of
https://github.com/we-promise/sure.git
synced 2026-04-20 04:24:06 +00:00
Add an optional fee field (decimal, precision: 19, scale: 4) to trades. Fee is included in the total amount calculation (qty * price + fee) for both create and update flows. The fee field appears on both the create and edit forms, defaults to 0, and auto-submits like other trade fields. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
6 lines
164 B
Ruby
6 lines
164 B
Ruby
class AddFeeToTrades < ActiveRecord::Migration[7.2]
|
|
def change
|
|
add_column :trades, :fee, :decimal, precision: 19, scale: 4, default: 0, null: false
|
|
end
|
|
end
|