Change Unit.multiplier type from decimal to float

Remove remnants related to BigDecimal.
This commit is contained in:
2026-05-23 17:02:01 +02:00
parent 1ab925f6fa
commit 0e0cfeff10
18 changed files with 134 additions and 100 deletions

View File

@@ -4,7 +4,7 @@ class CreateUnits < ActiveRecord::Migration[8.1]
t.references :user, foreign_key: {on_delete: :cascade}
t.string :symbol, null: false, limit: 15
t.text :description
t.decimal :multiplier, null: false, precision: 30, scale: 15, default: 1.0
t.float :multiplier, null: false, limit: Float::MANT_DIG, default: 1.0
t.references :base, foreign_key: {to_table: :units, on_delete: :cascade}
t.timestamps