class CreatePProducts < ActiveRecord::Migration[6.0]
  def change
    create_table :p_products do |t|
      t.string       :name
      t.decimal      :price,   :precision => 14,   :scale => 2
      t.references   :p_product_cat,   index: true
      t.string       :code
      t.string       :conditionnement
      t.string       :uv
      t.string       :compte_achat
      t.string       :compte_vente
      t.boolean      :tgap,   :default => false
      t.boolean      :fisc,   :default => false
      t.string       :un
      t.decimal      :capacite,   :precision => 14,   :scale => 2
      t.string       :compte_transport
      t.boolean      :enabled,   :default => true

      t.timestamps
    end
  end
end
