20160121011352_create_inventories_moves.rb 426 B

123456789101112131415
  1. class CreateInventoriesMoves < ActiveRecord::Migration
  2. def change
  3. create_table :inventories_moves do |t|
  4. t.belongs_to :inventory, index: true
  5. t.belongs_to :product, index: true
  6. t.belongs_to :purchase, index: true
  7. t.belongs_to :sale, index: true
  8. t.decimal :quantity, default: 0, null: false
  9. t.string :move_type, null: false, limit: 1
  10. t.timestamps null: false
  11. end
  12. end
  13. end