class CreateLineStockUsages < ActiveRecord::Migration[6.0]
  def change
    create_table :line_stock_usages do |t|
      t.references :line_stock, foreign_key: true
      t.decimal :qte,   :precision => 14,   :scale => 2
      t.decimal :cc_price_u_ht,   :precision => 14,   :scale => 2
      t.decimal :ac_price_u_ht,   :precision => 14,   :scale => 2
      t.decimal :cc_price_ht,   :precision => 14,   :scale => 2
      t.decimal :ac_price_ht,   :precision => 14,   :scale => 2
      t.integer :dest_line_stock_id

      t.timestamps
    end
  end
end
