1
0
mirror of https://github.com/fspc/BikeShed-1.git synced 2025-03-01 01:03:23 -05:00
BikeShed-1/db/migrate/20121205043759_create_transactions.rb

21 lines
764 B
Ruby
Raw Normal View History

2012-12-05 00:07:04 -05:00
class CreateTransactions < ActiveRecord::Migration
def change
create_table :transactions do |t|
t.integer "vendor_id", :null => false
t.integer "customer_id", :null => false
t.string "customer_type", :null => false
2012-12-05 00:07:04 -05:00
t.integer "bike_id"
t.integer "amount", :null => false
t.string "item", :null => false
2012-12-05 00:07:04 -05:00
#Adding whether or not a user sold or purchased the bike
#could be used to help keep track of external sales.
#aka, a collective member (user) sold a bike to
#a non user
#Currently this model automatically assumes that the user is
#purchasing a bike, or a part for a bike from the collective
#t.boolean "user_sold_flag", :default => false
t.timestamps
2012-12-05 00:07:04 -05:00
end
end
end