class CreateStockMovementLines < ActiveRecord::Migration[6.0]
  def change
    create_table :stock_movement_lines do |t|
      t.references :stock_movement, foreign_key: true
      t.decimal :ct_price_u_ht,   :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 :ct_tot_amount_ht,   :precision => 14,   :scale => 2
      t.decimal :cc_tot_amount_ht,   :precision => 14,   :scale => 2
      t.decimal :ac_tot_amount_ht,   :precision => 14,   :scale => 2
      t.decimal :qte,   :precision => 14,   :scale => 2
      t.integer :p_product_ref_id

      t.timestamps
    end
  end
end
