Introduced StockChange. Implemented first part of stockit-logic with updating article's quantity.

This commit is contained in:
Benjamin Meichsner 2009-01-16 02:17:49 +01:00
parent 7ff0467b16
commit b38025869a
27 changed files with 233 additions and 123 deletions

View file

@ -0,0 +1,17 @@
class CreateStockChanges < ActiveRecord::Migration
def self.up
create_table :stock_changes do |t|
t.references :delivery
t.references :order
t.references :article
t.decimal :quantity, :precision => 6, :scale => 2, :default => 0.0
t.datetime :created_at
end
add_column :articles, :quantity, :decimal, :precision => 6, :scale => 2, :default => 0.0
end
def self.down
drop_table :stock_changes
end
end