class CreateProductCommissions < ActiveRecord::Migration[5.1]
  # rake db:migrate:down VERSION=20170825034141
  def change
    create_table :product_commissions do |t|
      t.string :product_type
      t.string :product_code
      t.string :commission_id
      t.integer :commissioner_id
      t.decimal :qty, precision: 10, scale: 2, default: 0.00
      t.string :sale_id
      t.string :sale_item_id
      t.decimal :price, precision: 10, scale: 2, default: 0.00
      t.decimal :amount, precision: 10, scale: 2, default: 0.00
      t.timestamps
    end
  end
end
