forked from fixin.me/fixin.me
Disallow NULLs
This commit is contained in:
parent
f4ca1e91fa
commit
f3751c5fa1
@ -2,12 +2,12 @@ class CreateUnits < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
create_table :units do |t|
|
||||
t.references :user, foreign_key: true
|
||||
t.string :symbol
|
||||
t.string :symbol, null: false
|
||||
t.string :name
|
||||
t.decimal :multiplier, precision: 30, scale: 15, default: 1.0
|
||||
t.decimal :multiplier, null: false, precision: 30, scale: 15, default: 1.0
|
||||
t.references :base
|
||||
|
||||
t.timestamps
|
||||
t.timestamps null: false
|
||||
end
|
||||
add_index :units, [:user_id, :symbol], unique: true
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user