forked from fixin.me/fixin.me
@@ -5,7 +5,7 @@ class CreateUnits < ActiveRecord::Migration[7.0]
|
||||
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, foreign_key: {to_table: :units}
|
||||
t.references :base, foreign_key: {to_table: :units, on_delete: :cascade}
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
|
||||
@@ -4,7 +4,7 @@ class CreateQuantities < ActiveRecord::Migration[7.2]
|
||||
t.references :user, foreign_key: true
|
||||
t.string :name, null: false, limit: 31
|
||||
t.text :description
|
||||
t.references :parent, foreign_key: {to_table: :quantities}
|
||||
t.references :parent, foreign_key: {to_table: :quantities, on_delete: :cascade}
|
||||
|
||||
t.timestamps null: false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user