class CreateItems < ActiveRecord::Migration
  def change
    create_table :items do |t|
      t.string :name
      t.string :code, limit: 10
      t.decimal :current_input_price, precision: 5, scale: 2
      t.decimal :list_price, precision: 5, scale: 2
      t.integer :unit_id
      t.decimal :units_in_pack, precision: 5, scale: 3
      t.text :description
      t.integer :sub_category_id
      t.integer :stock
      t.boolean :on_display

      t.timestamps null: false 
    end
  end
end
