18 lines
566 B
Ruby
18 lines
566 B
Ruby
class CreatePTankStocks < ActiveRecord::Migration[6.0]
|
|
def change
|
|
create_table :p_tank_stocks do |t|
|
|
t.datetime :ok_at
|
|
t.boolean :enabled
|
|
t.references :p_brut_product, index: true, foreign_key: true
|
|
t.decimal :volume, precision: 12, scale: 4
|
|
t.decimal :price, precision: 12, scale: 4
|
|
t.references :p_tank, index: true, foreign_key: true
|
|
t.string :stock_type
|
|
t.decimal :volume_abs, precision: 12, scale: 4
|
|
t.decimal :volume_restant, precision: 12, scale: 4
|
|
|
|
t.timestamps null: false
|
|
end
|
|
end
|
|
end
|