Unit: limit symbol length, change name:string -> description:text

Closes #11
Closes #12
This commit is contained in:
2024-11-24 15:13:59 +01:00
parent d6fdff252a
commit 3711251656
6 changed files with 28 additions and 16 deletions

View File

@@ -2,8 +2,8 @@ class CreateUnits < ActiveRecord::Migration[7.0]
def change
create_table :units do |t|
t.references :user, foreign_key: true
t.string :symbol, null: false
t.string :name
t.string :symbol, null: false, limit: 15
t.text :description
t.decimal :multiplier, null: false, precision: 30, scale: 15, default: 1.0
t.references :base