2015-01-22 06:38:48 +01:00
|
|
|
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
|
|
|
|
|
|
2015-03-13 07:56:11 +01:00
|
|
|
t.timestamps null: false
|
2015-01-22 06:38:48 +01:00
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|