qi6_app/db/migrate/20180616095238_create_p_tank_stocks.rb
2019-05-17 12:30:45 +02:00

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